summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lookup/tests.py3
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',