summaryrefslogtreecommitdiffstats
path: root/engagements/tests/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'engagements/tests/conftest.py')
-rw-r--r--engagements/tests/conftest.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/engagements/tests/conftest.py b/engagements/tests/conftest.py
new file mode 100644
index 0000000..cb0b9e0
--- /dev/null
+++ b/engagements/tests/conftest.py
@@ -0,0 +1,39 @@
+import pytest
+
+from engagements.models import EngagementType, Organisation, Engagement
+from myuser.models import TeamUser
+
+
+@pytest.fixture
+def engagement():
+ data = {
+ "proposed_start_date": "2022-10-01",
+ "engagement_type": EngagementType.objects.create(name="ET1"),
+ "external_party": Organisation.objects.create(name="O1"),
+ }
+ return Engagement.objects.create(**data)
+
+
+@pytest.fixture
+def user():
+ return TeamUser.objects.create_user(email="ming@ming.com")
+
+
+@pytest.fixture
+def engagement_type():
+ return EngagementType.objects.create(name="ET2")
+
+
+@pytest.fixture
+def external_party():
+ return Organisation.objects.create(name="O2")
+
+
+@pytest.fixture
+def user1():
+ return TeamUser.objects.create_user(email="user1@example.com")
+
+
+@pytest.fixture
+def user2():
+ return TeamUser.objects.create_user(email="user2@example.com")