summaryrefslogtreecommitdiffstats
path: root/engagements/tests
diff options
context:
space:
mode:
Diffstat (limited to 'engagements/tests')
-rw-r--r--engagements/tests/test_forms.py12
-rw-r--r--engagements/tests/test_views.py6
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