Ticket #21366: 21366_test.diff

File 21366_test.diff, 770 bytes (added by Tim Graham, 11 years ago)
  • tests/queries/tests.py

    diff --git a/tests/queries/tests.py b/tests/queries/tests.py
    index 090fedb..fcc8e2e 100644
    a b class ValuesJoinPromotionTests(TestCase):  
    31183118    def test_non_nullable_fk_not_promoted(self):
    31193119        qs = ObjectB.objects.values('objecta__name')
    31203120        self.assertTrue(' INNER JOIN ' in str(qs.query))
     3121
     3122    def test_query_join_promote_regress(self):
     3123        # fails after ecaba3602837d1e02fe1e961f7d3bf9086453259
     3124        # LEFT OUTER JOIN below is now INNER JOIN
     3125        qs = Report.objects.filter(
     3126            Q(creator__ranking__isnull=True) |
     3127            Q(creator__ranking__rank=1, name='Foo')
     3128        )
     3129        self.assertTrue(' LEFT OUTER JOIN "queries_ranking"' in str(qs.query))
Back to Top