Mike Bayer avatar Mike Bayer committed 50d8c61

added test to verify #1423

Comments (0)

Files changed (1)

test/orm/test_query.py

         
     def test_one_filter(self):
         assert [User(id=8), User(id=9)] == create_session().query(User).filter(User.name.endswith('ed')).all()
-
+    
     def test_contains(self):
         """test comparing a collection to an object instance."""
 
         eq_([User(id=10)], sess.query(User).filter(User.addresses==None).all())
         eq_([User(id=7),User(id=8),User(id=9)], sess.query(User).filter(User.addresses!=None).order_by(User.id).all())
 
+    def test_blank_filter_by(self):
+        eq_(
+            [(7,), (8,), (9,), (10,)],
+            create_session().query(User.id).filter_by().order_by(User.id).all()
+        )
+        eq_(
+            [(7,), (8,), (9,), (10,)],
+            create_session().query(User.id).filter_by(**{}).order_by(User.id).all()
+        )
+
 
 class FromSelfTest(QueryTest, AssertsCompiledSQL):
     def test_filter(self):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.