get() should clear ordering for optimization purposes.
(self)
| 441 | ) |
| 442 | |
| 443 | def test_get_clears_ordering(self): |
| 444 | """ |
| 445 | get() should clear ordering for optimization purposes. |
| 446 | """ |
| 447 | with CaptureQueriesContext(connection) as captured_queries: |
| 448 | Author.objects.order_by("name").get(pk=self.a1.pk) |
| 449 | self.assertNotIn("order by", captured_queries[0]["sql"].lower()) |
| 450 | |
| 451 | def test_tickets_4088_4306(self): |
| 452 | self.assertSequenceEqual(Report.objects.filter(creator=1001), [self.r1]) |
nothing calls this directly
no test coverage detected