]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Merge branch 'reflect-unique-constraints' of https://bitbucket.org/jerdfelt/sqlalchem...
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 4 Oct 2014 21:47:53 +0000 (17:47 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 4 Oct 2014 21:47:53 +0000 (17:47 -0400)
1  2 
lib/sqlalchemy/engine/reflection.py
lib/sqlalchemy/testing/suite/test_reflection.py

Simple merge
index 60db9eb474815d7406ab79f38b2047dd6897c7b3,bd0be57380f37ded5660539f64c4696d9cf032e4..08b858b472850f302c9b4f788c5522efc14880d7
@@@ -497,13 -485,14 +497,15 @@@ class ComponentReflectionTest(fixtures.
          self._test_get_unique_constraints()
  
      @testing.requires.temp_table_reflection
 +    @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):