]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- add an order_by here
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 26 Nov 2014 15:34:46 +0000 (10:34 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 26 Nov 2014 15:34:46 +0000 (10:34 -0500)
test/orm/test_mapper.py

index 0a9cbfc718c3f8ff2196299f7321c67bbd9e7c21..63ba1a207f4d82695a04a639c648c50dadbd7613 100644 (file)
@@ -222,7 +222,8 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
         mapper(Address, addresses)
         s = create_session()
         a = s.query(Address).from_statement(
-            sa.select([addresses.c.id, addresses.c.user_id])).first()
+            sa.select([addresses.c.id, addresses.c.user_id]).
+            order_by(addresses.c.id)).first()
         eq_(a.user_id, 7)
         eq_(a.id, 1)
         # email address auto-defers