blunt rename of org (#620)

This commit is contained in:
Steven Reilly
2023-07-12 12:09:44 -04:00
committed by GitHub
parent 5fe81bc040
commit 13d0e46b52
107 changed files with 1471 additions and 1471 deletions

View File

@@ -1,14 +1,14 @@
from app.notify_client.status_api_client import StatusApiClient
def test_get_count_of_live_services_and_organisations(mocker):
def test_get_count_of_live_services_and_organizations(mocker):
mocker.patch('app.extensions.RedisClient.get', return_value=None)
client = StatusApiClient()
mock = mocker.patch.object(client, 'get', return_value={})
client.get_count_of_live_services_and_organisations()
client.get_count_of_live_services_and_organizations()
mock.assert_called_once_with(url='/_status/live-service-and-organisation-counts')
mock.assert_called_once_with(url='/_status/live-service-and-organization-counts')
def test_sets_value_in_cache(mocker):
@@ -26,12 +26,12 @@ def test_sets_value_in_cache(mocker):
'app.extensions.RedisClient.set',
)
assert client.get_count_of_live_services_and_organisations() == {'data_from': 'api'}
assert client.get_count_of_live_services_and_organizations() == {'data_from': 'api'}
mock_redis_get.assert_called_once_with('live-service-and-organisation-counts')
mock_api_get.assert_called_once_with(url='/_status/live-service-and-organisation-counts')
mock_redis_get.assert_called_once_with('live-service-and-organization-counts')
mock_api_get.assert_called_once_with(url='/_status/live-service-and-organization-counts')
mock_redis_set.assert_called_once_with(
'live-service-and-organisation-counts',
'live-service-and-organization-counts',
'{"data_from": "api"}',
ex=3600
)
@@ -51,9 +51,9 @@ def test_returns_value_from_cache(mocker):
'app.extensions.RedisClient.set',
)
assert client.get_count_of_live_services_and_organisations() == {'data_from': 'cache'}
assert client.get_count_of_live_services_and_organizations() == {'data_from': 'cache'}
mock_redis_get.assert_called_once_with('live-service-and-organisation-counts')
mock_redis_get.assert_called_once_with('live-service-and-organization-counts')
assert mock_api_get.called is False
assert mock_redis_set.called is False