Bump -utils to 55.0.0

This renames "delete_cache_keys_by_pattern" to match the new method
name, which will also catch exceptions if Redis is down [1].

Note that this also includes a change to RecipientCSV [2], which has
no effect because the new default is the same as the old behaviour.

[1]: https://github.com/alphagov/notifications-utils/pull/949
[2]: https://github.com/alphagov/notifications-utils/pull/947/files#diff-a8a994bf655634f89dc7439880708b4ff0d780ac1bd8033827d8aaa2692a8e0fR373
This commit is contained in:
Ben Thorner
2022-02-22 10:47:04 +00:00
parent f827a825a1
commit 81d9c73543
7 changed files with 17 additions and 17 deletions

View File

@@ -12,7 +12,7 @@ FAKE_TEMPLATE_ID = uuid4()
def test_client_posts_archived_true_when_deleting_template(mocker):
mocker.patch('app.notify_client.current_user', id='1')
mock_redis_delete_by_pattern = mocker.patch('app.extensions.RedisClient.delete_cache_keys_by_pattern')
mock_redis_delete_by_pattern = mocker.patch('app.extensions.RedisClient.delete_by_pattern')
expected_data = {
'archived': True,
'created_by': '1'
@@ -467,7 +467,7 @@ def test_deletes_caches_when_modifying_templates(
):
mocker.patch('app.notify_client.current_user', id='1')
mock_redis_delete = mocker.patch('app.extensions.RedisClient.delete')
mock_redis_delete_by_pattern = mocker.patch('app.extensions.RedisClient.delete_cache_keys_by_pattern')
mock_redis_delete_by_pattern = mocker.patch('app.extensions.RedisClient.delete_by_pattern')
mock_request = mocker.patch('notifications_python_client.base.BaseAPIClient.request')
getattr(service_api_client, method)(*extra_args)
@@ -482,7 +482,7 @@ def test_deletes_caches_when_modifying_templates(
def test_deletes_cached_users_when_archiving_service(mocker, mock_get_service_templates):
mock_redis_delete = mocker.patch('app.extensions.RedisClient.delete')
mock_redis_delete_by_pattern = mocker.patch('app.extensions.RedisClient.delete_cache_keys_by_pattern')
mock_redis_delete_by_pattern = mocker.patch('app.extensions.RedisClient.delete_by_pattern')
mocker.patch('notifications_python_client.base.BaseAPIClient.request', return_value={'data': ""})
@@ -542,7 +542,7 @@ def test_client_doesnt_delete_service_template_cache_when_none_exist(
mocker.patch('app.notify_client.current_user', id='1')
mocker.patch('notifications_python_client.base.BaseAPIClient.request')
mock_redis_delete = mocker.patch('app.extensions.RedisClient.delete')
mock_redis_delete_by_pattern = mocker.patch('app.extensions.RedisClient.delete_cache_keys_by_pattern')
mock_redis_delete_by_pattern = mocker.patch('app.extensions.RedisClient.delete_by_pattern')
service_api_client.update_reply_to_email_address(SERVICE_ONE_ID, uuid4(), 'foo@bar.com')
@@ -560,7 +560,7 @@ def test_client_deletes_service_template_cache_when_service_is_updated(
mocker.patch('app.notify_client.current_user', id='1')
mocker.patch('notifications_python_client.base.BaseAPIClient.request')
mock_redis_delete = mocker.patch('app.extensions.RedisClient.delete')
mock_redis_delete_by_pattern = mocker.patch('app.extensions.RedisClient.delete_cache_keys_by_pattern')
mock_redis_delete_by_pattern = mocker.patch('app.extensions.RedisClient.delete_by_pattern')
service_api_client.update_reply_to_email_address(SERVICE_ONE_ID, uuid4(), 'foo@bar.com')