| 1694 | self.assertEqual(qs.get(has_author_alias_match=True), tag) |
| 1695 | |
| 1696 | def test_exact_query_rhs_with_selected_columns(self): |
| 1697 | newest_author = Author.objects.create(name="Author 2") |
| 1698 | authors_max_ids = ( |
| 1699 | Author.objects.filter( |
| 1700 | name="Author 2", |
| 1701 | ) |
| 1702 | .values( |
| 1703 | "name", |
| 1704 | ) |
| 1705 | .annotate( |
| 1706 | max_id=Max("id"), |
| 1707 | ) |
| 1708 | .values("max_id") |
| 1709 | ) |
| 1710 | authors = Author.objects.filter(id=authors_max_ids[:1]) |
| 1711 | self.assertEqual(authors.get(), newest_author) |
| 1712 | |
| 1713 | def test_exact_query_rhs_with_selected_columns_mismatch(self): |
| 1714 | msg = ( |