MCPcopy
hub / github.com/django/django / test_missing_fields_fetch_mode_peers

Method test_missing_fields_fetch_mode_peers

tests/raw_query/tests.py:314–319  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

312 list(Author.objects.raw(query))
313
314 def test_missing_fields_fetch_mode_peers(self):
315 query = "SELECT id, first_name, dob FROM raw_query_author"
316 authors = list(Author.objects.fetch_mode(FETCH_PEERS).raw(query))
317 with self.assertNumQueries(1):
318 authors[0].last_name
319 authors[1].last_name
320
321 def test_missing_fields_fetch_mode_raise(self):
322 query = "SELECT id, first_name, dob FROM raw_query_author"

Callers

nothing calls this directly

Calls 3

fetch_modeMethod · 0.80
assertNumQueriesMethod · 0.80
rawMethod · 0.45

Tested by

no test coverage detected