1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Fixed #19895 -- Second iterator over invalid qs raises errors

The fix was already in the patch for #18702, so only test added for
ticket #19895.
This commit is contained in:
Anssi Kääriäinen 2013-05-22 08:28:17 +03:00
parent 90a6c3aaf0
commit 904084611d

View File

@ -2504,6 +2504,13 @@ class IteratorExceptionsTest(TestCase):
with self.assertRaises(AttributeError):
list(qs)
def test_invalid_qs_list(self):
# Test for #19895 - second iteration over invalid queryset
# raises errors.
qs = Article.objects.order_by('invalid_column')
self.assertRaises(FieldError, list, qs)
self.assertRaises(FieldError, list, qs)
class NullJoinPromotionOrTest(TestCase):
def setUp(self):