diff options
| author | Gavin Wahl <gwahl@fusionbox.com> | 2015-09-02 13:17:53 -0600 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-09-03 07:35:22 -0400 |
| commit | 627c7eb7bf81fe4faac552475fa13f449dc8dd33 (patch) | |
| tree | e3444fb3b7696f9e79139a7af69313e5a4769e57 /tests | |
| parent | a8eb715b663ff836e54f04c0e4fcafa2ee468b4e (diff) | |
Fixed #25335 -- Fixed regression where QuerySet.iterator() didn't return an iterator.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/lookup/tests.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py index 0468811a54..408d2930b3 100644 --- a/tests/lookup/tests.py +++ b/tests/lookup/tests.py @@ -1,5 +1,6 @@ from __future__ import unicode_literals +import collections from datetime import datetime from operator import attrgetter from unittest import skipUnless @@ -75,6 +76,8 @@ class LookupTests(TestCase): def test_iterator(self): # Each QuerySet gets iterator(), which is a generator that "lazily" # returns results using database-level iteration. + self.assertIsInstance(Article.objects.iterator(), collections.Iterator) + self.assertQuerysetEqual(Article.objects.iterator(), [ 'Article 5', |
