summaryrefslogtreecommitdiffstats
path: root/engagements
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-09-10 11:14:43 +0100
committerMatthew Lemon <y@yulqen.org>2024-09-10 11:14:43 +0100
commitf96b5ba4052c28d2bd2c03cefba3a2e828dd059d (patch)
tree50d1f8783a7f5391aaa09a23985ba72a4df0c2c8 /engagements
parent86c02670efcb1a219acff44fd8b5b723ac30bfa0 (diff)
Finish the job of the last commit
Diffstat (limited to 'engagements')
-rw-r--r--engagements/tests/test_models.py4
-rw-r--r--engagements/tests/test_views.py2
2 files changed, 2 insertions, 4 deletions
diff --git a/engagements/tests/test_models.py b/engagements/tests/test_models.py
index 9b15307..3b84ead 100644
--- a/engagements/tests/test_models.py
+++ b/engagements/tests/test_models.py
@@ -2,19 +2,19 @@ import pytest
from engagements.utils import populate_database
+pytestmark = pytest.mark.django_db
+
@pytest.fixture
def data():
return populate_database()
-@pytest.mark.django_db
def test_check_all_dcs(data):
dscs = data.get("sub_instruments")
assert dscs[0].title == "DSC 1 - Title 1"
-@pytest.mark.django_db
def test_effort_by_type(data):
e = data["engagements"][0]
total_planning = sum([x.effort_total_planned_hours() for x in e.effort.filter(effort_type="PLANNING")])
diff --git a/engagements/tests/test_views.py b/engagements/tests/test_views.py
index b809530..233ac7e 100644
--- a/engagements/tests/test_views.py
+++ b/engagements/tests/test_views.py
@@ -21,7 +21,6 @@ def request_factory():
return RequestFactory()
-@pytest.mark.django_db
def test_dscs_for_ep(client, test_data, request_factory):
org = test_data["orgs"][0]
et = models.EngagementType.objects.get(name="INSPECTION")
@@ -56,7 +55,6 @@ def test_dscs_for_ep(client, test_data, request_factory):
assert si3 in response.context["dscs"]
-@pytest.mark.django_db
def test_get_blank_form(client, test_data, request_factory):
url = reverse("engagements:effort_create", kwargs={"eid": 1, "etype": "PLANNING"})
client.force_login(test_data["superuser"])