MCPcopy
hub / github.com/django/django / test_fetch_mode_raise

Method test_fetch_mode_raise

tests/prefetch_related/tests.py:139–141  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

137 )
138
139 def test_fetch_mode_raise(self):
140 authors = list(Author.objects.fetch_mode(RAISE).prefetch_related("first_book"))
141 authors[0].first_book # No exception, already loaded
142
143 def test_foreignkey_reverse(self):
144 with self.assertNumQueries(2):

Callers

nothing calls this directly

Calls 2

fetch_modeMethod · 0.80
prefetch_relatedMethod · 0.45

Tested by

no test coverage detected