diff --git a/tests/filtered_relation/tests.py b/tests/filtered_relation/tests.py
index 48154413a5..49ca4178ea 100644
a
|
b
|
class FilteredRelationTests(TestCase):
|
52 | 52 | (self.author2, self.book3, self.editor_b, self.author2), |
53 | 53 | ], lambda x: (x, x.book_join, x.book_join.editor, x.book_join.author)) |
54 | 54 | |
| 55 | def test_select_related_multiple(self): |
| 56 | qs = Book.objects.annotate( |
| 57 | author_join=FilteredRelation('author'), |
| 58 | editor_join=FilteredRelation('editor'), |
| 59 | ).select_related('author_join', 'editor_join').order_by('pk') |
| 60 | self.assertQuerysetEqual(qs, [ |
| 61 | (self.book1, self.author1, self.editor_a), |
| 62 | (self.book2, self.author2, self.editor_b), |
| 63 | (self.book3, self.author2, self.editor_b), |
| 64 | (self.book4, self.author1, self.editor_a), |
| 65 | ], |
| 66 | lambda x: (x, x.author_join, x.editor_join), |
| 67 | ) |
| 68 | |
55 | 69 | def test_select_related_with_empty_relation(self): |
56 | 70 | qs = Author.objects.annotate( |
57 | 71 | book_join=FilteredRelation('book', condition=Q(pk=-1)), |