Ticket #22992: 22992-test.diff

File 22992-test.diff, 605 bytes (added by Tim Graham, 10 years ago)
  • tests/generic_relations/tests.py

    diff --git a/tests/generic_relations/tests.py b/tests/generic_relations/tests.py
    index ae90ace..3e05bb7 100644
    a b class GenericRelationsTests(TestCase):  
    304304        self.assertFalse(created)
    305305        self.assertEqual(tag.content_object.id, diamond.id)
    306306
     307    def test_query_content_type(self):
     308        with six.assertRaisesRegex(self, FieldError, "^Cannot resolve keyword 'content_object' into field."):
     309            TaggedItem.objects.get(content_object='')
     310
    307311
    308312class CustomWidget(forms.TextInput):
    309313    pass
Back to Top