Skip to content

Commit

Permalink
test(enrollment): update context and cover setting up the enrollment …
Browse files Browse the repository at this point in the history
…overlay_language
  • Loading branch information
lalver1 committed Jul 26, 2024
1 parent 37ce663 commit e01c6cd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/pytest/enrollment/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,17 @@ def test_index_eligible_get(client, model_EligibilityType):
assert "token_field" in response.context_data
assert "form_retry" in response.context_data
assert "form_success" in response.context_data
assert "overlay_language" in response.context_data


@pytest.mark.django_db
@pytest.mark.usefixtures("mocked_session_agency", "mocked_session_verifier", "mocked_session_eligibility")
@pytest.mark.parametrize("LANGUAGE_CODE, overlay_language", [("en", "en"), ("es", "es-419")])
def test_index_eligible_get_changed_language(client, LANGUAGE_CODE, overlay_language):
path = reverse(ROUTE_INDEX)
response = client.get(path, headers={"accept-language": LANGUAGE_CODE})

assert response.context_data["overlay_language"] == overlay_language


@pytest.mark.django_db
Expand Down

0 comments on commit e01c6cd

Please sign in to comment.