Ticket #31990: test-31990.diff

File test-31990.diff, 631 bytes (added by Mariusz Felisiak, 4 years ago)

Regression test.

  • tests/queries/tests.py

    diff --git a/tests/queries/tests.py b/tests/queries/tests.py
    index f9a57b088a..528356f5da 100644
    a b class QuerysetOrderedTests(unittest.TestCase):  
    20842084        self.assertIs(qs.ordered, False)
    20852085        self.assertIs(qs.order_by('num_notes').ordered, True)
    20862086
     2087    def test_annotated_default_ordering(self):
     2088        qs = Tag.objects.annotate(num_notes=Count('pk'))
     2089        self.assertIs(qs.ordered, False)
     2090        self.assertIs(qs.order_by('name').ordered, True)
     2091
    20872092
    20882093@skipUnlessDBFeature('allow_sliced_subqueries_with_in')
    20892094class SubqueryTests(TestCase):
Back to Top