1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Initial implementation of custom lookups

This commit is contained in:
Anssi Kääriäinen
2013-11-27 22:07:30 +02:00
parent 01e8ac47b3
commit 4d219d4cde
16 changed files with 594 additions and 97 deletions

View File

@@ -443,7 +443,7 @@ class BaseAggregateTestCase(TestCase):
vals = Author.objects.filter(pk=1).aggregate(Count("friends__id"))
self.assertEqual(vals, {"friends__id__count": 2})
books = Book.objects.annotate(num_authors=Count("authors__name")).filter(num_authors__ge=2).order_by("pk")
books = Book.objects.annotate(num_authors=Count("authors__name")).filter(num_authors__exact=2).order_by("pk")
self.assertQuerysetEqual(
books, [
"The Definitive Guide to Django: Web Development Done Right",