MCPcopy
hub / github.com/django/django / test_exact_query_rhs_with_selected_columns

Method test_exact_query_rhs_with_selected_columns

tests/lookup/tests.py:1696–1711  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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 = (

Callers

nothing calls this directly

Calls 6

MaxClass · 0.90
annotateMethod · 0.80
createMethod · 0.45
valuesMethod · 0.45
filterMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected