diff options
author | Matthew Lemon <y@yulqen.org> | 2024-10-16 17:23:14 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-10-16 17:23:14 +0100 |
commit | 1c7d45e92f83263a202d2f72c9daac61d34619cd (patch) | |
tree | ad62f6f4bda17055d29e6bd36ace9c511f7fa29c /engagements/tests | |
parent | 8946e0f171379078c5a2230f38cf47f245e9b841 (diff) |
wip: create assessment form
Diffstat (limited to 'engagements/tests')
-rw-r--r-- | engagements/tests/test_forms.py | 12 | ||||
-rw-r--r-- | engagements/tests/test_views.py | 6 |
2 files changed, 17 insertions, 1 deletions
diff --git a/engagements/tests/test_forms.py b/engagements/tests/test_forms.py index deb0a29..436be34 100644 --- a/engagements/tests/test_forms.py +++ b/engagements/tests/test_forms.py @@ -1,7 +1,12 @@ import pytest from django.forms import DateInput, Select, SelectMultiple -from engagements.forms import EngagementCreateForm, EngagementEffortCreateForm, EngagementStrategyCreateForm +from engagements.forms import ( + EngagementCreateForm, + EngagementEffortCreateForm, + EngagementStrategyCreateForm, + AssessmentCreateForm, +) from engagements.models import EngagementType, RegulatoryCycle pytestmark = pytest.mark.django_db @@ -129,3 +134,8 @@ def test_create_engagement_strategy_form(org, user, regulatory_cycles): } form = EngagementStrategyCreateForm(data=form_data) assert form.is_valid() + + +def test_create_assessment_engagement_type_form(): + e_type = EngagementType(name="ASSESSMENT") + form = AssessmentCreateForm({"initial": e_type}) diff --git a/engagements/tests/test_views.py b/engagements/tests/test_views.py index a7a420b..ef64f5e 100644 --- a/engagements/tests/test_views.py +++ b/engagements/tests/test_views.py @@ -140,3 +140,9 @@ def test_org_list_page_exists(client): url = reverse("engagements:org_detail") response = client.get(url) assert response.status_code == 302 + + +def test_assessment_create_form_view(client): + url = reverse("engagements:create_assessment") + response = client.get(url) + assert response.status_code == 302 |