Ticket #12885: 12885-test.diff

File 12885-test.diff, 729 bytes (added by Tim Graham, 9 years ago)
  • tests/generic_relations/tests.py

    diff --git a/tests/generic_relations/tests.py b/tests/generic_relations/tests.py
    index dab1b8a..6c6663c 100644
    a b class GenericRelationsTests(TestCase):  
    405405        # GenericRelations to models that use multi-table inheritance work.
    406406        granite = ValuableRock.objects.create(name='granite', hardness=5)
    407407        ValuableTaggedItem.objects.create(content_object=granite, tag="countertop", value=1)
     408        self.assertEqual(ValuableRock.objects.filter(tags__tag="countertop").count(), 1)
    408409        granite.delete()  # deleting the rock should delete the related tag.
    409410        self.assertEqual(ValuableTaggedItem.objects.count(), 0)
    410411
Back to Top