Ordering can be based on fields included from an 'extra' clause
(self)
| 341 | qs.last() |
| 342 | |
| 343 | def test_extra_ordering(self): |
| 344 | """ |
| 345 | Ordering can be based on fields included from an 'extra' clause |
| 346 | """ |
| 347 | self.assertQuerySetEqual( |
| 348 | Article.objects.extra( |
| 349 | select={"foo": "pub_date"}, order_by=["foo", "headline"] |
| 350 | ), |
| 351 | [ |
| 352 | "Article 1", |
| 353 | "Article 2", |
| 354 | "Article 3", |
| 355 | "Article 4", |
| 356 | ], |
| 357 | attrgetter("headline"), |
| 358 | ) |
| 359 | |
| 360 | def test_extra_ordering_quoting(self): |
| 361 | """ |
nothing calls this directly
no test coverage detected