diff --git a/benefits/enrollment/views.py b/benefits/enrollment/views.py index c0abdeaee..ddf8a2cdf 100644 --- a/benefits/enrollment/views.py +++ b/benefits/enrollment/views.py @@ -102,7 +102,7 @@ def index(request): if not already_enrolled: # enroll user with an expiration date, return success client.link_concession_group_funding_source( - group_id=group_id, funding_source_id=funding_source.id, expiry_date=session.enrollment_expiry(request) + group_id=group_id, funding_source_id=funding_source.id, expiry=session.enrollment_expiry(request) ) return success(request) else: # already_enrolled @@ -111,7 +111,7 @@ def index(request): client.update_concession_group_funding_source_expiry( group_id=group_id, funding_source_id=funding_source.id, - expiry_date=session.enrollment_expiry(request), + expiry=session.enrollment_expiry(request), ) return success(request) else: @@ -125,7 +125,7 @@ def index(request): client.update_concession_group_funding_source_expiry( group_id=group_id, funding_source_id=funding_source.id, - expiry_date=session.enrollment_expiry(request), + expiry=session.enrollment_expiry(request), ) return success(request) else: diff --git a/tests/pytest/enrollment/test_views.py b/tests/pytest/enrollment/test_views.py index dbab785e2..2c3f2b886 100644 --- a/tests/pytest/enrollment/test_views.py +++ b/tests/pytest/enrollment/test_views.py @@ -311,7 +311,7 @@ def test_index_eligible_post_valid_form_success_supports_expiration( mock_client.link_concession_group_funding_source.assert_called_once_with( funding_source_id=mocked_funding_source.id, group_id=model_EligibilityType_supports_expiration.group_id, - expiry_date=mocked_session_enrollment_expiry.return_value, + expiry=mocked_session_enrollment_expiry.return_value, ) assert response.status_code == 200 assert response.template_name == TEMPLATE_SUCCESS @@ -343,7 +343,7 @@ def test_index_eligible_post_valid_form_success_supports_expiration_no_expiry( mock_client.update_concession_group_funding_source_expiry.assert_called_once_with( funding_source_id=mocked_funding_source.id, group_id=model_EligibilityType_supports_expiration.group_id, - expiry_date=mocked_session_enrollment_expiry.return_value, + expiry=mocked_session_enrollment_expiry.return_value, ) assert response.status_code == 200 assert response.template_name == TEMPLATE_SUCCESS @@ -414,7 +414,7 @@ def test_index_eligible_post_valid_form_success_supports_expiration_is_expired( mock_client.update_concession_group_funding_source_expiry.assert_called_once_with( funding_source_id=mocked_funding_source.id, group_id=model_EligibilityType_supports_expiration.group_id, - expiry_date=mocked_session_enrollment_expiry.return_value, + expiry=mocked_session_enrollment_expiry.return_value, ) assert response.status_code == 200 assert response.template_name == TEMPLATE_SUCCESS @@ -524,7 +524,7 @@ def test_index_eligible_post_valid_form_success_supports_expiration_is_within_re mock_client.update_concession_group_funding_source_expiry.assert_called_once_with( funding_source_id=mocked_funding_source.id, group_id=model_EligibilityType_supports_expiration.group_id, - expiry_date=mocked_session_enrollment_expiry.return_value, + expiry=mocked_session_enrollment_expiry.return_value, ) assert response.status_code == 200 assert response.template_name == TEMPLATE_SUCCESS