Added test, updated AUTHORS and changelog (#498)

This commit is contained in:
Ross Lawley
2013-11-29 12:04:30 +00:00
parent 7200a8cb84
commit bcbbbe4046
3 changed files with 16 additions and 1 deletions

View File

@@ -2882,6 +2882,19 @@ class QuerySetTest(unittest.TestCase):
self.assertEqual(10, Post.objects.limit(5).skip(5).count(with_limit_and_skip=False))
def test_count_and_none(self):
"""Test count works with None()"""
class MyDoc(Document):
pass
MyDoc.drop_collection()
for i in xrange(0, 10):
MyDoc().save()
self.assertEqual(MyDoc.objects.count(), 10)
self.assertEqual(MyDoc.objects.none().count(), 0)
def test_call_after_limits_set(self):
"""Ensure that re-filtering after slicing works
"""