mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user