Permalink
Browse files

[soc2010/query-refactor] Added tests for slicing and count.

  • Loading branch information...
alex committed Jun 22, 2010
1 parent d6993c7 commit 9a895a63782057ff9638434897b637012cd801b5
Showing with 3 additions and 0 deletions.
  1. +3 −0 tests/regressiontests/mongodb/tests.py
@@ -44,6 +44,9 @@ def test_count(self):
self.assertEqual(Artist.objects.filter(good=False).count(), 1)
self.assertEqual(Artist.objects.aggregate(c=Count("pk")), {"c": 6})
+
+ self.assertEqual(Artist.objects.all()[:3].count(), 3)
+ self.assertEqual(Artist.objects.all()[3:].count(), 3)
def test_foreignkey(self):
e = Group.objects.create(name="The E Street Band")

0 comments on commit 9a895a6

Please sign in to comment.