1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

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

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/query-refactor@13383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor 2010-06-22 18:09:15 +00:00
parent d6993c7dbb
commit 9a895a6378

View File

@ -45,6 +45,9 @@ class MongoTestCase(TestCase):
self.assertEqual(Artist.objects.aggregate(c=Count("pk")), {"c": 6}) 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): def test_foreignkey(self):
e = Group.objects.create(name="The E Street Band") e = Group.objects.create(name="The E Street Band")
b = Artist.objects.create(name="Clarence Clemons", good=True, b = Artist.objects.create(name="Clarence Clemons", good=True,