diff options
| author | Tim Graham <timograham@gmail.com> | 2016-10-14 08:48:50 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-10-14 08:51:04 -0400 |
| commit | b679a3cdb119b375f32c3d89b967f9cf6e7fa2f5 (patch) | |
| tree | 0526b7d1eec45e9d4fe51cad81fccf2c584e6887 /tests | |
| parent | 9108696a7553123f57c5d42f9c4a90cad44532f4 (diff) | |
Tested QuerySet compatibility check.
cdfdcf4b70bebfc68871df885387790c6afbc23c missed this test.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/queries/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/queries/tests.py b/tests/queries/tests.py index 9e65b1a412..5b1f9f6ad1 100644 --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -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 |
