From 007f17d63e05d8422ec63eab75d6a97fd3175be9 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sat, 10 Feb 2007 05:38:38 +0000 Subject: Fixed #3463 -- EmptyQuerySet's iterator() now returns a generator. Thanks, Gary Wilson git-svn-id: http://code.djangoproject.com/svn/django/trunk@4475 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/lookup/models.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/modeltests/lookup/models.py b/tests/modeltests/lookup/models.py index 8468d396f7..d344710bef 100644 --- a/tests/modeltests/lookup/models.py +++ b/tests/modeltests/lookup/models.py @@ -198,6 +198,8 @@ DoesNotExist: Article matching query does not exist. [] >>> Article.objects.none().count() 0 +>>> [article for article in Article.objects.none().iterator()] +[] # using __in with an empty list should return an empty query set >>> Article.objects.filter(id__in=[]) -- cgit v1.3