Exemplo n.º 1
0
 def test_compare_has_table_for_sql_and_odbc(self, schema, engine_name):
     with self.engine_map[engine_name].begin() as c:
         dialect = EXADialect()
         has_table_fallback = dialect.has_table(connection=c,
                                                schema=schema,
                                                use_sql_fallback=True,
                                                table_name="t")
         has_table_odbc = dialect.has_table(connection=c,
                                            schema=schema,
                                            table_name="t")
         assert has_table_fallback == has_table_odbc, "Expected table %s.t with odbc and fallback" % schema
Exemplo n.º 2
0
 def test_has_table_table_exists_not(self, use_sql_fallback, engine_name):
     with self.engine_map[engine_name].begin() as c:
         dialect = EXADialect()
         has_table = dialect.has_table(connection=c,
                                       schema=self.schema,
                                       table_name="not_exist",
                                       use_sql_fallback=use_sql_fallback)
         assert not has_table, "Table %s.not_exist was found, but should not exist" % self.schema