]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- fix a bunch of test failures
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 8 Oct 2013 14:42:13 +0000 (10:42 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 8 Oct 2013 14:42:13 +0000 (10:42 -0400)
lib/sqlalchemy/orm/strategy_options.py
test/orm/test_deferred.py
test/orm/test_options.py
test/profiles.txt

index 0e2cf3a61c7105031975e88d54156777119ffc5b..72dafb472f681e08dd9ba388d1b5225b088172c8 100644 (file)
@@ -171,7 +171,7 @@ class Load(Generative, MapperOption):
 
     def _coerce_strat(self, strategy):
         if strategy is not None:
-            strategy = tuple(strategy.items())
+            strategy = tuple(sorted(strategy.items()))
         return strategy
 
     @_generative
index 3336f03b53d159b7ec70d7665591ee55236a324e..88e7e866332840c1309ba2729aea377289c88676 100644 (file)
@@ -5,7 +5,7 @@ from sqlalchemy.orm import mapper, deferred, defer, undefer, Load, \
     joinedload, defaultload
 from sqlalchemy.testing import eq_, AssertsCompiledSQL
 from test.orm import _fixtures
-
+from sqlalchemy.orm import strategies
 
 class DeferredTest(AssertsCompiledSQL, _fixtures.FixtureTest):
 
@@ -536,10 +536,11 @@ class DeferredOptionsTest(AssertsCompiledSQL, _fixtures.FixtureTest):
         addresses = self.tables.addresses
         orders = self.tables.orders
 
-        mapper(User, users, properties={
-                "addresses": relationship(Address, lazy="joined"),
-                "orders": relationship(Order, lazy="joined")
-            })
+        mapper(User, users, properties=util.OrderedDict([
+                ("addresses", relationship(Address, lazy="joined")),
+                ("orders", relationship(Order, lazy="joined"))
+            ]))
+
         mapper(Address, addresses)
         mapper(Order, orders)
 
index 29c2c698e1fdca12b387f47ba2a7d95662348be8..6eba38d15cab453959c3801939872537ab645677 100644 (file)
@@ -141,7 +141,7 @@ class LoadTest(PathTest, QueryTest):
 
         l1 = Load(User)
         l2 = l1.defer("name")
-        l3 = l2.context.values()[0]
+        l3 = list(l2.context.values())[0]
         eq_(
             l1.context,
             {
index 9b6cf5aa5279244ff5fe42f72249a113db982dd2..c1ee8638a3d6c41c7715b47c4ea8fb79f323ff13 100644 (file)
@@ -399,7 +399,7 @@ test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_6_editing 3.3_postgresq
 
 # TEST: test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_7_multiview
 
-test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_7_multiview 2.7_postgresql_psycopg2_cextensions 2300
+test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_7_multiview 2.7_postgresql_psycopg2_cextensions 2424
 test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_7_multiview 2.7_postgresql_psycopg2_nocextensions 2559
 test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_7_multiview 3.2_postgresql_psycopg2_nocextensions 2483
 test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_7_multiview 3.3_postgresql_psycopg2_cextensions 2460