From 0509210a68e417ab33f367a96e0c06377940f640 Mon Sep 17 00:00:00 2001 From: Michael Trier Date: Sun, 19 Apr 2009 21:23:36 +0000 Subject: [PATCH] standardized tests on test_schema and test_schema_2. --- README.unittests | 3 ++- test/dialect/sqlite.py | 16 ++++++++-------- test/engine/reflection.py | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.unittests b/README.unittests index 67f5d7133f..fba7da1d55 100644 --- a/README.unittests +++ b/README.unittests @@ -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 diff --git a/test/dialect/sqlite.py b/test/dialect/sqlite.py index dae4a41a8c..35f6cbba72 100644 --- a/test/dialect/sqlite.py +++ b/test/dialect/sqlite.py @@ -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): diff --git a/test/engine/reflection.py b/test/engine/reflection.py index 0bd1d7b9e3..d69be5c3fd 100644 --- a/test/engine/reflection.py +++ b/test/engine/reflection.py @@ -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: -- 2.47.3