diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-03-24 18:24:21 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-03-24 18:24:21 -0400 |
| commit | 07c9bc77f7e6a2938d8453c01dd00f1294050933 (patch) | |
| tree | 8b2c6f957b16f8d06c0ffddfa2e5365fb4c6f165 /lib/sqlalchemy/testing | |
| parent | 9ca5b47fc9b0b48caf5af2f8c70cf38109e25b39 (diff) | |
| download | sqlalchemy-07c9bc77f7e6a2938d8453c01dd00f1294050933.tar.gz | |
- limit some of these on views, indexes, pk constraints being available
Diffstat (limited to 'lib/sqlalchemy/testing')
| -rw-r--r-- | lib/sqlalchemy/testing/suite/test_reflection.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py index 5beed6aad..7cae48572 100644 --- a/lib/sqlalchemy/testing/suite/test_reflection.py +++ b/lib/sqlalchemy/testing/suite/test_reflection.py @@ -87,8 +87,10 @@ class ComponentReflectionTest(fixtures.TablesTest): test_needs_fk=True, ) - cls.define_index(metadata, users) - cls.define_views(metadata, schema) + if testing.requires.index_reflection.enabled: + cls.define_index(metadata, users) + if testing.requires.view_reflection.enabled: + cls.define_views(metadata, schema) @classmethod def define_index(cls, metadata, users): @@ -121,12 +123,14 @@ class ComponentReflectionTest(fixtures.TablesTest): self.assert_('test_schema' in insp.get_schema_names()) + @testing.requires.schema_reflection def test_dialect_initialize(self): engine = engines.testing_engine() assert not hasattr(engine.dialect, 'default_schema_name') inspect(engine) assert hasattr(engine.dialect, 'default_schema_name') + @testing.requires.schema_reflection def test_get_default_schema_name(self): insp = inspect(testing.db) eq_(insp.default_schema_name, testing.db.dialect.default_schema_name) @@ -157,6 +161,7 @@ class ComponentReflectionTest(fixtures.TablesTest): self._test_get_table_names() @testing.requires.table_reflection + @testing.requires.foreign_key_constraint_reflection def test_get_table_names_fks(self): self._test_get_table_names(order_by='foreign_key') @@ -261,6 +266,7 @@ class ComponentReflectionTest(fixtures.TablesTest): self._test_get_pk_constraint() @testing.requires.table_reflection + @testing.requires.primary_key_constraint_reflection @testing.requires.schemas def test_get_pk_constraint_with_schema(self): self._test_get_pk_constraint(schema='test_schema') |
