diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-02-10 05:38:38 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-02-10 05:38:38 +0000 |
| commit | 007f17d63e05d8422ec63eab75d6a97fd3175be9 (patch) | |
| tree | 85c2c9b67563a9c49555a4bdbf23f95cec8e0c43 /tests | |
| parent | 1aa1c4672cf7213f1073a5ab5f7c1ac8bc78d19f (diff) | |
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
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/modeltests/lookup/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
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=[]) |
