MCPcopy Index your code
hub / github.com/Flagsmith/flagsmith / generate_database_models

Method generate_database_models

api/util/tests.py:14–25  ·  view source on GitHub ↗
(identifier="user1")

Source from the content-addressed store, hash-verified

12
13 @staticmethod
14 def generate_database_models(identifier="user1"): # type: ignore[no-untyped-def]
15 organisation = Organisation(name="ssg")
16 organisation.save()
17 project = Project(name="project1", organisation=organisation)
18 project.save()
19 environment = Environment(name="environment1", project=project)
20 environment.save()
21 feature = Feature(name="feature1", project=project)
22 feature.save()
23 identity = Identity(identifier=identifier, environment=environment)
24 identity.save()
25 return identity, project
26
27 @staticmethod
28 def clean_up(): # type: ignore[no-untyped-def]

Callers

nothing calls this directly

Calls 6

OrganisationClass · 0.90
ProjectClass · 0.90
EnvironmentClass · 0.90
FeatureClass · 0.90
IdentityClass · 0.90
saveMethod · 0.45

Tested by

no test coverage detected