summaryrefslogtreecommitdiff
path: root/tests/generic_relations
diff options
context:
space:
mode:
authorDaniel Pyrathon <pirosb3@gmail.com>2015-01-06 19:16:35 -0500
committerTim Graham <timograham@gmail.com>2015-01-06 19:25:12 -0500
commitfb48eb05816b1ac87d58696cdfe48be18c901f16 (patch)
tree3d2e981b6f3fafdeb7310d0734fb148ebb7f6aef /tests/generic_relations
parent749d23251bbd6564341405e6f8c1da129b8307e7 (diff)
downloaddjango-fb48eb05816b1ac87d58696cdfe48be18c901f16.tar.gz
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!
Diffstat (limited to 'tests/generic_relations')
-rw-r--r--tests/generic_relations/tests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/generic_relations/tests.py b/tests/generic_relations/tests.py
index e7f7b02f5b..c6230b057e 100644
--- a/tests/generic_relations/tests.py
+++ b/tests/generic_relations/tests.py
@@ -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='')