Update _delete_template_cache_for_service to delete all template version cache and not just the one ending in "None"

Update all methods that were previous calling @cache.delete('service-{service-id}-template-None') to instead call _delete_template_cache_for_service
Remove call to get service templates, it's not needed since all template version cache is being deleted.
This commit is contained in:
Rebecca Law
2021-01-25 14:03:16 +00:00
parent e2ecff050d
commit 01a3df6edc
4 changed files with 41 additions and 36 deletions

View File

@@ -3976,10 +3976,12 @@ def test_archive_service_after_confirm(
mock_get_service_and_organisation_counts,
mock_get_organisations_and_services_for_user,
mock_get_users_by_service,
mock_get_service_templates,
user,
):
mocked_fn = mocker.patch('app.service_api_client.post')
redis_delete_mock = mocker.patch('app.notify_client.service_api_client.redis_client.delete')
mocker.patch('app.notify_client.service_api_client.redis_client.delete_cache_keys_by_pattern')
client_request.login(user)
page = client_request.post(
'main.archive_service',