mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
This commit is contained in:
committed by
Tim Graham
parent
749d23251b
commit
fb48eb0581
@@ -403,7 +403,8 @@ class GenericRelationsTests(TestCase):
|
||||
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."):
|
||||
msg = "Field 'content_object' does not generate an automatic reverse relation"
|
||||
with self.assertRaisesMessage(FieldError, msg):
|
||||
TaggedItem.objects.get(content_object='')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user