diff --git a/tests/ordering/tests.py b/tests/ordering/tests.py
index fe319b3859..a04e2674ed 100644
a
|
b
|
class OrderingTests(TestCase):
|
194 | 194 | len(list(Article.objects.order_by("?"))), 4 |
195 | 195 | ) |
196 | 196 | |
| 197 | def test_random_ordering_distinct(self): |
| 198 | author = Author.objects.create() |
| 199 | Article.objects.update(author=author) |
| 200 | self.assertSequenceEqual( |
| 201 | Author.objects.filter(article__in=[self.a1, self.a2]).order_by('?').distinct(), |
| 202 | [author], |
| 203 | ) |
| 204 | |
197 | 205 | def test_reversed_ordering(self): |
198 | 206 | """ |
199 | 207 | Ordering can be reversed using the reverse() method on a queryset. |