MCPcopy
hub / github.com/django/django / test_survives_clone

Method test_survives_clone

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

Source from the content-addressed store, hash-verified

177 self.assertEqual(author.name, author.bio.author.name)
178
179 def test_survives_clone(self):
180 with self.assertNumQueries(2):
181 [
182 list(b.first_time_authors.all())
183 for b in Book.objects.prefetch_related("first_time_authors").exclude(
184 id=1000
185 )
186 ]
187
188 def test_len(self):
189 with self.assertNumQueries(2):

Callers

nothing calls this directly

Calls 4

assertNumQueriesMethod · 0.80
excludeMethod · 0.80
allMethod · 0.45
prefetch_relatedMethod · 0.45

Tested by

no test coverage detected