diff options
Diffstat (limited to 'engagements/tests')
-rw-r--r-- | engagements/tests/test_forms.py | 7 |
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(): |