Ticket #34125: test-34125.diff

File test-34125.diff, 765 bytes (added by Mariusz Felisiak, 2 years ago)

Regression test.

  • tests/queries/test_qs_combinators.py

    diff --git a/tests/queries/test_qs_combinators.py b/tests/queries/test_qs_combinators.py
    index 97b3f97b68..8a088c5f5e 100644
    a b class QuerySetSetOperationTests(TestCase):  
    6161        self.assertSequenceEqual(qs3.none(), [])
    6262        self.assertNumbersEqual(qs3, [0, 1, 8, 9], ordered=False)
    6363
     64    def test_union_none_slice(self):
     65        qs1 = Number.objects.filter(num__lte=0)
     66        qs2 = Number.objects.none()
     67        qs3 = qs1.union(qs2)
     68        self.assertNumbersEqual(qs3[:1], [0])
     69
    6470    def test_union_order_with_null_first_last(self):
    6571        Number.objects.filter(other_num=5).update(other_num=None)
    6672        qs1 = Number.objects.filter(num__lte=1)
Back to Top