mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +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:
parent
d6993c7dbb
commit
9a895a6378
@ -45,6 +45,9 @@ class MongoTestCase(TestCase):
|
||||
|
||||
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")
|
||||
b = Artist.objects.create(name="Clarence Clemons", good=True,
|
||||
|
Loading…
x
Reference in New Issue
Block a user