MCPcopy
hub / github.com/PostHog/posthog / setUpTestData

Method setUpTestData

posthog/api/test/test_user.py:35–43  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

33
34 @classmethod
35 def setUpTestData(cls):
36 super().setUpTestData()
37
38 cls.new_org = Organization.objects.create(name="New Organization")
39 cls.new_project = Team.objects.create(name="New Project", organization=cls.new_org)
40 cls.user.join(organization=cls.new_org)
41 cls.user.current_organization = cls.organization
42 cls.user.current_team = cls.team
43 cls.user.save()
44
45 def setUp(self):
46 # prevent throttling of user requests to pass on from one test

Callers 1

setUpTestDataMethod · 0.45

Calls 3

joinMethod · 0.80
createMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected