]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
this is what I meant to do here but this should be improved
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 25 Mar 2010 04:40:33 +0000 (00:40 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 25 Mar 2010 04:40:33 +0000 (00:40 -0400)
test/orm/test_query.py

index 9852d882cbaa76e22d7e38b969c18aa240967a07..b71b1dd1bf9ccb3b383fc282b12aee0653e19836 100644 (file)
@@ -694,10 +694,10 @@ class FilterTest(QueryTest):
         assert [] == create_session().query(User).order_by(User.id)[0:0]
         
     def test_exists(self):
-        sess = create_session()
+        sess = create_session(testing.db)
         
-        assert sess.query(exists([User.id])).filter(User.id==9).scalar()
-        assert not sess.query(exists([User.id])).filter(User.id==29).scalar()
+        assert sess.query(exists().where(User.id==9)).scalar()
+        assert not sess.query(exists().where(User.id==29)).scalar()
         
     def test_one_filter(self):
         assert [User(id=8), User(id=9)] == create_session().query(User).filter(User.name.endswith('ed')).all()