1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Tested QuerySet compatibility check.

cdfdcf4b70 missed this test.
This commit is contained in:
Tim Graham
2016-10-14 08:48:50 -04:00
parent 9108696a75
commit b679a3cdb1
2 changed files with 6 additions and 1 deletions

View File

@@ -2969,6 +2969,11 @@ class QuerySetExceptionTests(TestCase):
with self.assertRaisesMessage(FieldError, msg):
list(Article.objects.order_by('*'))
def test_invalid_queryset_model(self):
msg = 'Cannot use QuerySet for "Article": Use a QuerySet for "ExtraInfo".'
with self.assertRaisesMessage(ValueError, msg):
list(Author.objects.filter(extra=Article.objects.all()))
class NullJoinPromotionOrTest(TestCase):
@classmethod