Commits

Mike Bayer committed 5b196f3

fixup for test cases with mysql

Comments (0)

Files changed (2)

test/orm/query.py

             q = sess.query(User)
 
             q = q.add_entity(Address).outerjoin('addresses', aliased=aliased)
-            l = q.all()
-            assert l == expected
+            l = q.order_by(User.id).order_by(Address.id).all()
+            self.assertEquals(l, expected)
             sess.clear()
 
             q = sess.query(User).add_entity(Address)
             l = q.join('addresses', aliased=aliased).filter_by(email_address='ed@bettyboop.com').all()
-            assert l == [(user8, address3)]
+            self.assertEquals(l, [(user8, address3)])
             sess.clear()
 
             q = sess.query(User, Address).join('addresses', aliased=aliased).filter_by(email_address='ed@bettyboop.com')
-            assert q.all() == [(user8, address3)]
+            self.assertEquals(q.all(), [(user8, address3)])
             sess.clear()
 
             q = sess.query(User, Address).join('addresses', aliased=aliased).options(eagerload('addresses')).filter_by(email_address='ed@bettyboop.com')

test/testlib/fixtures.py

 
 users = Table('users', metadata,
     Column('id', Integer, primary_key=True),
-    Column('name', String(30), nullable=False))
+    Column('name', String(30), nullable=False),
+    test_needs_acid=True,
+    )
 
 orders = Table('orders', metadata,
     Column('id', Integer, primary_key=True),
     Column('user_id', None, ForeignKey('users.id')),
     Column('address_id', None, ForeignKey('addresses.id')),
     Column('description', String(30)),
-    Column('isopen', Integer)
+    Column('isopen', Integer),
+    test_needs_acid=True,
     )
 
 addresses = Table('addresses', metadata,
     Column('id', Integer, primary_key=True),
     Column('user_id', None, ForeignKey('users.id')),
-    Column('email_address', String(50), nullable=False))
+    Column('email_address', String(50), nullable=False),
+    test_needs_acid=True,
+    )
 
 dingalings = Table("dingalings", metadata,
     Column('id', Integer, primary_key=True),
     Column('address_id', None, ForeignKey('addresses.id')),
-    Column('data', String(30))
+    Column('data', String(30)),
+    test_needs_acid=True,
     )
 
 items = Table('items', metadata,
     Column('id', Integer, primary_key=True),
-    Column('description', String(30), nullable=False)
+    Column('description', String(30), nullable=False),
+    test_needs_acid=True,
     )
 
 order_items = Table('order_items', metadata,
     Column('item_id', None, ForeignKey('items.id')),
-    Column('order_id', None, ForeignKey('orders.id')))
+    Column('order_id', None, ForeignKey('orders.id')),
+    test_needs_acid=True,
+    )
 
 item_keywords = Table('item_keywords', metadata,
     Column('item_id', None, ForeignKey('items.id')),
-    Column('keyword_id', None, ForeignKey('keywords.id')))
+    Column('keyword_id', None, ForeignKey('keywords.id')),
+    test_needs_acid=True,
+    )
 
 keywords = Table('keywords', metadata,
     Column('id', Integer, primary_key=True),
-    Column('name', String(30), nullable=False)
+    Column('name', String(30), nullable=False),
+    test_needs_acid=True,
     )
 
 def install_fixture_data():