From 3a80bf0d504ccc1e198249be27d87a6045c39ee4 Mon Sep 17 00:00:00 2001 From: Roman Podolyaka Date: Sat, 22 Jun 2013 15:57:03 +0300 Subject: Fix unique constraints reflection in PostgreSQL Reflection of unique constraints must preserve the order of columns. --- lib/sqlalchemy/testing/suite/test_reflection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/testing/suite/test_reflection.py') diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py index 7ab4097a1..255fd5595 100644 --- a/lib/sqlalchemy/testing/suite/test_reflection.py +++ b/lib/sqlalchemy/testing/suite/test_reflection.py @@ -370,9 +370,9 @@ class ComponentReflectionTest(fixtures.TablesTest): def _test_get_unique_constraints(self, schema=None): uniques = sorted( [ + {'name': 'unique_a', 'column_names': ['a']}, {'name': 'unique_a_b_c', 'column_names': ['a', 'b', 'c']}, - {'name': 'unique_a_c', 'column_names': ['a', 'c']}, - {'name': 'unique_b_c', 'column_names': ['b', 'c']}, + {'name': 'unique_c_a_b', 'column_names': ['c', 'a', 'b']}, {'name': 'unique_asc_key', 'column_names': ['asc', 'key']}, ], key=operator.itemgetter('name') -- cgit v1.2.1