MCPcopy
hub / github.com/django/django / setUpTestData

Method setUpTestData

tests/test_utils/tests.py:393–395  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

391class CaptureQueriesContextManagerTests(TestCase):
392 @classmethod
393 def setUpTestData(cls):
394 cls.person_pk = str(Person.objects.create(name="test").pk)
395 cls.url = f"/test_utils/get_person/{cls.person_pk}/"
396
397 def test_simple(self):
398 with CaptureQueriesContext(connection) as captured_queries:

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected