From 128a16d82db763d32f2f080e0e94ad0a9c35fda4 Mon Sep 17 00:00:00 2001 From: Luis Alvergue Date: Mon, 10 Jun 2024 21:21:09 +0000 Subject: [PATCH] refactor(tests): update eligibility type enrollment index template test --- tests/pytest/core/test_models.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/pytest/core/test_models.py b/tests/pytest/core/test_models.py index c3470bdb8..63c6ae3e7 100644 --- a/tests/pytest/core/test_models.py +++ b/tests/pytest/core/test_models.py @@ -238,13 +238,15 @@ def test_EligibilityType_supports_expiration(model_EligibilityType_supports_expi @pytest.mark.django_db -def test_EligibilityType_enrollment_index_template(model_EligibilityType): - assert model_EligibilityType.enrollment_index_template == "enrollment/index.html" +def test_EligibilityType_enrollment_index_template(): + new_eligibility_type = EligibilityType.objects.create() + + assert new_eligibility_type.enrollment_index_template == "enrollment/index.html" - model_EligibilityType.enrollment_index_template = "test/enrollment.html" - model_EligibilityType.save() + new_eligibility_type.enrollment_index_template = "test/enrollment.html" + new_eligibility_type.save() - assert model_EligibilityType.enrollment_index_template == "test/enrollment.html" + assert new_eligibility_type.enrollment_index_template == "test/enrollment.html" @pytest.mark.django_db