diff options
Diffstat (limited to 'engagements')
-rw-r--r-- | engagements/tests/test_forms.py | 1 | ||||
-rw-r--r-- | engagements/tests/test_models.py | 1 | ||||
-rw-r--r-- | engagements/tests/test_views.py | 7 |
3 files changed, 6 insertions, 3 deletions
diff --git a/engagements/tests/test_forms.py b/engagements/tests/test_forms.py index b9807dd..24077e9 100644 --- a/engagements/tests/test_forms.py +++ b/engagements/tests/test_forms.py @@ -6,6 +6,7 @@ from engagements.models import EngagementType pytestmark = pytest.mark.django_db + def test_basic_validation(engagement, user): form = EngagementEffortCreateForm( data={ diff --git a/engagements/tests/test_models.py b/engagements/tests/test_models.py index 73738db..9b15307 100644 --- a/engagements/tests/test_models.py +++ b/engagements/tests/test_models.py @@ -4,7 +4,6 @@ from engagements.utils import populate_database @pytest.fixture -@pytest.mark.django_db def data(): return populate_database() diff --git a/engagements/tests/test_views.py b/engagements/tests/test_views.py index 4899c58..b809530 100644 --- a/engagements/tests/test_views.py +++ b/engagements/tests/test_views.py @@ -8,9 +8,10 @@ from django.urls import reverse from engagements import models, views from engagements.utils import populate_database +pytestmark = pytest.mark.django_db + @pytest.fixture -@pytest.mark.django_db def test_data(): return populate_database() @@ -54,6 +55,7 @@ def test_dscs_for_ep(client, test_data, request_factory): assert si2 in response.context["dscs"] 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"}) @@ -61,4 +63,5 @@ def test_get_blank_form(client, test_data, request_factory): request = request_factory.get(url) request.user = test_data["superuser"] response = views.engagement_effort_create(request, eid=1, etype="PLANNING") - assert response.status_code == HTTPStatus.OK
\ No newline at end of file + assert response.status_code == HTTPStatus.OK + |