summaryrefslogtreecommitdiffstats
path: root/engagements/tests/test_forms.py
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-09-09 15:24:16 +0100
committerMatthew Lemon <y@yulqen.org>2024-09-09 15:24:16 +0100
commite3b47f5218aa9155e933c58465aebc071485df40 (patch)
treefad4b49b154e6dd97fc5fcbab4162ab8549b377e /engagements/tests/test_forms.py
parent09b099e467df64ac8ce44bbe2d1f80cd1c00a126 (diff)
Tests passing
Diffstat (limited to 'engagements/tests/test_forms.py')
-rw-r--r--engagements/tests/test_forms.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/engagements/tests/test_forms.py b/engagements/tests/test_forms.py
index 3c213c5..b9807dd 100644
--- a/engagements/tests/test_forms.py
+++ b/engagements/tests/test_forms.py
@@ -1,8 +1,7 @@
import pytest
from django.forms import DateInput, Select, SelectMultiple
-from engagements.forms import EngagementCreateForm
-from engagements.forms import EngagementEffortCreateForm
+from engagements.forms import EngagementCreateForm, EngagementEffortCreateForm
from engagements.models import EngagementType
pytestmark = pytest.mark.django_db
@@ -102,10 +101,10 @@ def test_form_missing_required_fields():
assert "external_party" in form.errors
-def test_form_engagement_type_queryset():
+def test_form_engagement_type_queryset(engagement_type):
initial_data = {"engagement_type": EngagementType.objects.all()}
form = EngagementCreateForm(initial=initial_data)
- assert form.fields["engagement_type"].queryset == initial_data["engagement_type"]
+ assert form.fields["engagement_type"].queryset.first().name == initial_data["engagement_type"].first().name
def test_form_engagement_type_queryset_without_initial():