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

Method setUpTestData

tests/test_utils/test_testcase.py:93–102  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

91
92 @classmethod
93 def setUpTestData(cls):
94 cls.jim_douglas = Person.objects.create(name="Jim Douglas")
95 cls.car = Car.objects.create(name="1963 Volkswagen Beetle")
96 cls.herbie = cls.jim_douglas.possessed_cars.create(
97 car=cls.car,
98 belongs_to=cls.jim_douglas,
99 )
100
101 cls.person_binary = Person.objects.create(name="Person", data=b"binary data")
102 cls.person_binary_get = Person.objects.get(pk=cls.person_binary.pk)
103
104 @assert_no_queries
105 def test_class_attribute_equality(self):

Callers

nothing calls this directly

Calls 2

createMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected