summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/generic_relations/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/generic_relations/tests.py b/tests/generic_relations/tests.py
index ed74eb59a5..38077df7c3 100644
--- a/tests/generic_relations/tests.py
+++ b/tests/generic_relations/tests.py
@@ -355,6 +355,10 @@ class GenericRelationsTests(TestCase):
self.assertFalse(created)
self.assertEqual(tag.content_object.id, diamond.id)
+ def test_query_content_type(self):
+ with six.assertRaisesRegex(self, FieldError, "^Cannot resolve keyword 'content_object' into field."):
+ TaggedItem.objects.get(content_object='')
+
class CustomWidget(forms.TextInput):
pass