From c9db377507a31fe71e2503126924bd45eea8156b Mon Sep 17 00:00:00 2001 From: Kegan Maher Date: Tue, 24 Sep 2024 22:41:20 +0000 Subject: [PATCH] chore(analytics): missed rename Verifier -> Flow --- benefits/eligibility/analytics.py | 8 ++++---- benefits/eligibility/views.py | 2 +- docs/development/application-logic.md | 2 +- tests/pytest/eligibility/test_views.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benefits/eligibility/analytics.py b/benefits/eligibility/analytics.py index 44a55e634..c918c56aa 100644 --- a/benefits/eligibility/analytics.py +++ b/benefits/eligibility/analytics.py @@ -14,7 +14,7 @@ def __init__(self, request, event_type, flow: models.EnrollmentFlow): self.update_enrollment_flows(flow) -class SelectedVerifierEvent(EligibilityEvent): +class SelectedFlowEvent(EligibilityEvent): """Analytics event representing the user selecting an enrollment flow.""" def __init__(self, request, flow: models.EnrollmentFlow): @@ -38,9 +38,9 @@ def __init__(self, request, flow: models.EnrollmentFlow, status, error=None): self.update_event_properties(status=status, error=error) -def selected_verifier(request, flow: models.EnrollmentFlow): - """Send the "selected eligibility verifier" analytics event.""" - core.send_event(SelectedVerifierEvent(request, flow)) +def selected_flow(request, flow: models.EnrollmentFlow): + """Send the "selected enrollment flow" analytics event.""" + core.send_event(SelectedFlowEvent(request, flow)) def started_eligibility(request, flow: models.EnrollmentFlow): diff --git a/benefits/eligibility/views.py b/benefits/eligibility/views.py index 8bbb78271..1b495fa43 100644 --- a/benefits/eligibility/views.py +++ b/benefits/eligibility/views.py @@ -38,7 +38,7 @@ def index(request): flow = EnrollmentFlow.objects.get(id=flow_id) session.update(request, flow=flow) - analytics.selected_verifier(request, flow) + analytics.selected_flow(request, flow) eligibility_start = reverse(routes.ELIGIBILITY_START) response = redirect(eligibility_start) diff --git a/docs/development/application-logic.md b/docs/development/application-logic.md index bad9010d8..b9bc441fd 100644 --- a/docs/development/application-logic.md +++ b/docs/development/application-logic.md @@ -120,7 +120,7 @@ flowchart LR agency -. update -.-o session eligibility -. update -.-o session - eligibility -. selected eligibility verifier -.-o analytics + eligibility -. selected enrollment flow -.-o analytics ``` Depending upon the choice of enrollment pathway, the _Next phase_ above may be: diff --git a/tests/pytest/eligibility/test_views.py b/tests/pytest/eligibility/test_views.py index 8aab99a45..fd4329df8 100644 --- a/tests/pytest/eligibility/test_views.py +++ b/tests/pytest/eligibility/test_views.py @@ -147,7 +147,7 @@ def test_index_post_valid_form(client, model_EnrollmentFlow, mocked_session_upda assert response.status_code == 302 assert response.url == reverse(routes.ELIGIBILITY_START) assert mocked_session_update.call_args.kwargs["flow"] == model_EnrollmentFlow - mocked_analytics_module.selected_verifier.assert_called_once() + mocked_analytics_module.selected_flow.assert_called_once() @pytest.mark.django_db