diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-10-04 17:47:53 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-10-04 17:47:53 -0400 |
| commit | f7dee1380c40f3e73868a136aae5d18e976aa757 (patch) | |
| tree | 3b429b8af5cb92c92a333bfebf0d61c31de2afc0 /lib/sqlalchemy/testing | |
| parent | 49e750a1d788710b89764c4dd9c0ddbf9b1f38ad (diff) | |
| parent | 7fa21b22989f6d53ff70a8df71fc6d210c556e07 (diff) | |
| download | sqlalchemy-f7dee1380c40f3e73868a136aae5d18e976aa757.tar.gz | |
Merge branch 'reflect-unique-constraints' of https://bitbucket.org/jerdfelt/sqlalchemy into pr30
Diffstat (limited to 'lib/sqlalchemy/testing')
| -rw-r--r-- | lib/sqlalchemy/testing/suite/test_reflection.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py index 60db9eb47..08b858b47 100644 --- a/lib/sqlalchemy/testing/suite/test_reflection.py +++ b/lib/sqlalchemy/testing/suite/test_reflection.py @@ -500,10 +500,12 @@ class ComponentReflectionTest(fixtures.TablesTest): @testing.requires.unique_constraint_reflection def test_get_temp_table_unique_constraints(self): insp = inspect(self.metadata.bind) - eq_( - insp.get_unique_constraints('user_tmp'), - [{'column_names': ['name'], 'name': 'user_tmp_uq'}] - ) + reflected = insp.get_unique_constraints('user_tmp') + for refl in reflected: + # Different dialects handle duplicate index and constraints + # differently, so ignore this flag + refl.pop('duplicates_index', None) + eq_(reflected, [{'column_names': ['name'], 'name': 'user_tmp_uq'}]) @testing.requires.temp_table_reflection def test_get_temp_table_indexes(self): @@ -556,6 +558,9 @@ class ComponentReflectionTest(fixtures.TablesTest): ) for orig, refl in zip(uniques, reflected): + # Different dialects handle duplicate index and constraints + # differently, so ignore this flag + refl.pop('duplicates_index', None) eq_(orig, refl) @testing.provide_metadata |
