From 700e073d0f49cf7e39b0f9735d5faaa4001265fa Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 12 Apr 2019 17:00:11 +0100 Subject: [PATCH] Stop sending service domain to the API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The API doesn’t look at it, and the rest of the admin code isn’t calling the method with this argument any more. --- app/notify_client/service_api_client.py | 2 -- tests/app/notify_client/test_service_api_client.py | 2 -- tests/app/notify_client/test_user_client.py | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/notify_client/service_api_client.py b/app/notify_client/service_api_client.py index b79651dbd..86cbaaa58 100644 --- a/app/notify_client/service_api_client.py +++ b/app/notify_client/service_api_client.py @@ -13,7 +13,6 @@ class ServiceAPIClient(NotifyAdminAPIClient): restricted, user_id, email_from, - service_domain, ): """ Create a service and return the json. @@ -26,7 +25,6 @@ class ServiceAPIClient(NotifyAdminAPIClient): "user_id": user_id, "restricted": restricted, "email_from": email_from, - "service_domain": service_domain } data = _attach_current_user(data) return self.post("/service", data)['data']['id'] diff --git a/tests/app/notify_client/test_service_api_client.py b/tests/app/notify_client/test_service_api_client.py index d3a34fd8c..24d350146 100644 --- a/tests/app/notify_client/test_service_api_client.py +++ b/tests/app/notify_client/test_service_api_client.py @@ -74,7 +74,6 @@ def test_client_creates_service_with_correct_data( True, fake_uuid, 'test@example.com', - 'nhs.uk' ) mock_post.assert_called_once_with( '/service', @@ -90,7 +89,6 @@ def test_client_creates_service_with_correct_data( restricted=True, user_id=fake_uuid, email_from='test@example.com', - service_domain='nhs.uk' ), ) diff --git a/tests/app/notify_client/test_user_client.py b/tests/app/notify_client/test_user_client.py index d5346fe4f..b7d41bf92 100644 --- a/tests/app/notify_client/test_user_client.py +++ b/tests/app/notify_client/test_user_client.py @@ -253,7 +253,7 @@ def test_returns_value_from_cache( (user_api_client, 'set_user_permissions', [user_id, SERVICE_ONE_ID, []], {}), (user_api_client, 'activate_user', [api_user_pending(sample_uuid())], {}), (service_api_client, 'remove_user_from_service', [SERVICE_ONE_ID, user_id], {}), - (service_api_client, 'create_service', ['', '', 0, False, user_id, sample_uuid(), ''], {}), + (service_api_client, 'create_service', ['', '', 0, False, user_id, sample_uuid()], {}), (invite_api_client, 'accept_invite', [SERVICE_ONE_ID, user_id], {}), ]) def test_deletes_user_cache(