From fce4082ffffebfde2809dd47992b7ddaab986a2d Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 11 Mar 2021 10:40:44 +0000 Subject: [PATCH] Rename to performance This is consistent with the old performance platform URLs, which were gov.uk/performance, and others that we have like /pricing and /features --- app/main/__init__.py | 2 +- app/main/views/{performance_platform.py => performance.py} | 4 ++-- .../app/notify_client/test_performance_platform_api_client.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename app/main/views/{performance_platform.py => performance.py} (85%) diff --git a/app/main/__init__.py b/app/main/__init__.py index c77effb0e..8e0542676 100644 --- a/app/main/__init__.py +++ b/app/main/__init__.py @@ -27,7 +27,7 @@ from app.main.views import ( # noqa isort:skip new_password, notifications, organisations, - performance_platform, + performance, platform_admin, providers, register, diff --git a/app/main/views/performance_platform.py b/app/main/views/performance.py similarity index 85% rename from app/main/views/performance_platform.py rename to app/main/views/performance.py index 9e777ae09..9dce4c4e7 100644 --- a/app/main/views/performance_platform.py +++ b/app/main/views/performance.py @@ -6,8 +6,8 @@ from app import performance_dashboard_api_client from app.main import main -@main.route("/performance-dashboard") -def performance_dashboard(): +@main.route("/performance") +def performance(): api_args = {} api_args['start_date'] = (datetime.utcnow() - timedelta(days=90)).date() diff --git a/tests/app/notify_client/test_performance_platform_api_client.py b/tests/app/notify_client/test_performance_platform_api_client.py index 25c1639b9..ed516c73c 100644 --- a/tests/app/notify_client/test_performance_platform_api_client.py +++ b/tests/app/notify_client/test_performance_platform_api_client.py @@ -9,4 +9,4 @@ def test_get_aggregate_platform_stats(mocker): params_dict = {'start_date': '2021-03-01', 'end_date': '2021-03-31'} client.get_performance_dashboard_stats(params_dict=params_dict) - mock.assert_called_once_with('/performance-platform', params=params_dict) + mock.assert_called_once_with('/performance-dashboard', params=params_dict)