(self, connection)
| 68 | |
| 69 | @testing.provide_metadata |
| 70 | def test_has_table_case_sensitive(self, connection): |
| 71 | preparer = testing.db.dialect.identifier_preparer |
| 72 | conn = connection |
| 73 | if conn.dialect.requires_name_normalize: |
| 74 | conn.exec_driver_sql("CREATE TABLE TAB1 (id INTEGER)") |
| 75 | else: |
| 76 | conn.exec_driver_sql("CREATE TABLE tab1 (id INTEGER)") |
| 77 | conn.exec_driver_sql( |
| 78 | "CREATE TABLE %s (id INTEGER)" % preparer.quote_identifier("tab2") |
| 79 | ) |
| 80 | conn.exec_driver_sql( |
| 81 | "CREATE TABLE %s (id INTEGER)" % preparer.quote_identifier("TAB3") |
| 82 | ) |
| 83 | conn.exec_driver_sql( |
| 84 | "CREATE TABLE %s (id INTEGER)" % preparer.quote_identifier("TAB4") |
| 85 | ) |
| 86 | |
| 87 | t1 = Table( |
| 88 | "tab1", self.metadata, Column("id", Integer, primary_key=True) |
| 89 | ) |
| 90 | t2 = Table( |
| 91 | "tab2", |
| 92 | self.metadata, |
| 93 | Column("id", Integer, primary_key=True), |
| 94 | quote=True, |
| 95 | ) |
| 96 | t3 = Table( |
| 97 | "TAB3", self.metadata, Column("id", Integer, primary_key=True) |
| 98 | ) |
| 99 | t4 = Table( |
| 100 | "TAB4", |
| 101 | self.metadata, |
| 102 | Column("id", Integer, primary_key=True), |
| 103 | quote=True, |
| 104 | ) |
| 105 | |
| 106 | insp = inspect(connection) |
| 107 | assert insp.has_table(t1.name) |
| 108 | eq_([c["name"] for c in insp.get_columns(t1.name)], ["id"]) |
| 109 | |
| 110 | assert insp.has_table(t2.name) |
| 111 | eq_([c["name"] for c in insp.get_columns(t2.name)], ["id"]) |
| 112 | |
| 113 | assert insp.has_table(t3.name) |
| 114 | eq_([c["name"] for c in insp.get_columns(t3.name)], ["id"]) |
| 115 | |
| 116 | assert insp.has_table(t4.name) |
| 117 | eq_([c["name"] for c in insp.get_columns(t4.name)], ["id"]) |
| 118 | |
| 119 | def test_basic(self, connection): |
| 120 | table1, table2 = self.tables("WorstCase1", "WorstCase2") |
nothing calls this directly
no test coverage detected