]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
standardized tests on test_schema and test_schema_2.
authorMichael Trier <mtrier@gmail.com>
Sun, 19 Apr 2009 21:23:36 +0000 (21:23 +0000)
committerMichael Trier <mtrier@gmail.com>
Sun, 19 Apr 2009 21:23:36 +0000 (21:23 +0000)
README.unittests
test/dialect/sqlite.py
test/engine/reflection.py

index 67f5d7133f98c0a6d1c8fa9ca06037d103979bd4..fba7da1d555766d37fbed46f89cc05af498de285 100644 (file)
@@ -182,7 +182,8 @@ IRC!
 
 TIPS
 ----
-Postgres: The tests require an 'alt_schema' and 'alt_schema_2' to be present in
+
+The tests require an 'test_schema' and 'test_schema_2' to be present in
 the testing database.
 
 Postgres: When running the tests on postgres, postgres can get slower and
index dae4a41a8c4875be41b59f9763d6eec5a65dd6ec..35f6cbba72d6f5569140991b80b631da9c3eaf36 100644 (file)
@@ -212,24 +212,24 @@ class DialectTest(TestBase, AssertsExecutionResults):
     def test_attached_as_schema(self):
         cx = testing.db.connect()
         try:
-            cx.execute('ATTACH DATABASE ":memory:" AS  alt_schema')
+            cx.execute('ATTACH DATABASE ":memory:" AS  test_schema')
             dialect = cx.dialect
-            assert dialect.table_names(cx, 'alt_schema') == []
+            assert dialect.table_names(cx, 'test_schema') == []
 
             meta = MetaData(cx)
             Table('created', meta, Column('id', Integer),
-                  schema='alt_schema')
+                  schema='test_schema')
             alt_master = Table('sqlite_master', meta, autoload=True,
-                               schema='alt_schema')
+                               schema='test_schema')
             meta.create_all(cx)
 
-            self.assertEquals(dialect.table_names(cx, 'alt_schema'),
+            self.assertEquals(dialect.table_names(cx, 'test_schema'),
                               ['created'])
             assert len(alt_master.c) > 0
 
             meta.clear()
             reflected = Table('created', meta, autoload=True,
-                              schema='alt_schema')
+                              schema='test_schema')
             assert len(reflected.c) == 1
 
             cx.execute(reflected.insert(), dict(id=1))
@@ -247,9 +247,9 @@ class DialectTest(TestBase, AssertsExecutionResults):
             # note that sqlite_master is cleared, above
             meta.drop_all()
 
-            assert dialect.table_names(cx, 'alt_schema') == []
+            assert dialect.table_names(cx, 'test_schema') == []
         finally:
-            cx.execute('DETACH DATABASE alt_schema')
+            cx.execute('DETACH DATABASE test_schema')
 
     @testing.exclude('sqlite', '<', (2, 6), 'no database support')
     def test_temp_table_reflection(self):
index 0bd1d7b9e3e51ec940477bd9af89c7f81932156c..d69be5c3fde285672b9d74363de6986502bdf006 100644 (file)
@@ -802,7 +802,7 @@ class HasSequenceTest(TestBase):
 # Tests related to engine.reflection
 
 def get_schema():
-    return 'alt_schema'
+    return 'test_schema'
 
 def createTables(meta, schema=None):
     if schema: