From ac5b80fe5e4d2d673e9ba022ab80554f746cf84c Mon Sep 17 00:00:00 2001 From: Kegan Maher Date: Wed, 17 Jul 2024 16:03:35 +0000 Subject: [PATCH] chore(oauth): normalize URL naming convention kebab-case is used elsewhere --- benefits/oauth/urls.py | 2 +- benefits/oauth/views.py | 2 +- tests/pytest/oauth/test_views.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benefits/oauth/urls.py b/benefits/oauth/urls.py index 9c6c8cb3f..82961d2cb 100644 --- a/benefits/oauth/urls.py +++ b/benefits/oauth/urls.py @@ -10,6 +10,6 @@ path("authorize", views.authorize, name="authorize"), path("cancel", views.cancel, name="cancel"), path("logout", views.logout, name="logout"), - path("post_logout", views.post_logout, name="post_logout"), + path("post-logout", views.post_logout, name="post-logout"), path("error", views.system_error, name="system-error"), ] diff --git a/benefits/oauth/views.py b/benefits/oauth/views.py index 036337330..07e7a54f6 100644 --- a/benefits/oauth/views.py +++ b/benefits/oauth/views.py @@ -19,7 +19,7 @@ ROUTE_AUTH = "oauth:authorize" ROUTE_CONFIRM = "eligibility:confirm" ROUTE_UNVERIFIED = "eligibility:unverified" -ROUTE_POST_LOGOUT = "oauth:post_logout" +ROUTE_POST_LOGOUT = "oauth:post-logout" TEMPLATE_SYSTEM_ERROR = "oauth/system_error.html" diff --git a/tests/pytest/oauth/test_views.py b/tests/pytest/oauth/test_views.py index 4a6c77c98..ba0244e25 100644 --- a/tests/pytest/oauth/test_views.py +++ b/tests/pytest/oauth/test_views.py @@ -366,7 +366,7 @@ def test_logout(mocker, mocked_oauth_client_or_error_redirect__client, mocked_an result = logout(app_request) - mocked_redirect.assert_called_with(mocked_oauth_client, token, "https://testserver/oauth/post_logout") + mocked_redirect.assert_called_with(mocked_oauth_client, token, "https://testserver/oauth/post-logout") mocked_analytics_module.started_sign_out.assert_called_once() assert result.status_code == 200 assert message in str(result.content)