Beispiel #1
0
 def test_compare_get_view_definition_for_sql_and_odbc(
         self, schema, engine_name):
     with self.engine_map[engine_name].begin() as c:
         if schema is None:
             c.execute("OPEN SCHEMA %s" % self.schema)
         view_name = "v"
         dialect = EXADialect()
         view_definition_fallback = dialect.get_view_definition(
             connection=c,
             view_name=view_name,
             schema=schema,
             use_sql_fallback=True)
         view_definition_odbc = dialect.get_view_definition(
             connection=c, view_name=view_name, schema=schema)
         assert view_definition_fallback == view_definition_odbc
Beispiel #2
0
 def test_get_view_definition(self, use_sql_fallback, engine_name):
     with self.engine_map[engine_name].begin() as c:
         dialect = EXADialect()
         view_definition = dialect.get_view_definition(
             connection=c,
             schema=self.schema,
             view_name="v",
             use_sql_fallback=use_sql_fallback)
         assert self.view_defintion == view_definition