Ticket #26261: 26261-test.diff

File 26261-test.diff, 738 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 806f8ca..ebb0719 100644
    a b class GenericRelationsTests(TestCase):  
    119119        self.assertQuerysetEqual(
    120120            qs, ["hairy", "mpk", "yellow"], lambda x: x.tag)
    121121
     122    def test_exclude_over_reverse_generic_relation_with_related_query_name(self):
     123        self.platypus.tags.create(tag='fatty')
     124        s = TaggedItem.objects.exclude(animal__common_name='Lion')
     125        self.assertQuerysetEqual(qs, ['fatty'], lambda x: x.tag)
     126
    122127    def test_exclude_generic_relations(self):
    123128        """
    124129        Test lookups over an object without GenericRelations.
Back to Top