Use new fields for getting orgs and services

Uses https://github.com/alphagov/notifications-api/pull/2539 to reduce
the number of API calls we make.
This commit is contained in:
Chris Hill-Scott
2019-06-12 12:09:26 +01:00
parent da29d722f9
commit 0aea038d51
11 changed files with 165 additions and 138 deletions

View File

@@ -100,7 +100,7 @@ def test_user_information_page_shows_information_about_user(
mocker.patch(
'app.user_api_client.get_organisations_and_services_for_user',
return_value={'organisations': [], 'services_without_organisations': [
return_value={'organisations': [], 'services': [
{"id": 1, "name": "Fresh Orchard Juice", "restricted": True},
{"id": 2, "name": "Nature Therapy", "restricted": False},
]},
@@ -138,7 +138,7 @@ def test_user_information_page_displays_if_there_are_failed_login_attempts(
mocker.patch(
'app.user_api_client.get_organisations_and_services_for_user',
return_value={'organisations': [], 'services_without_organisations': [
return_value={'organisations': [], 'services': [
{"id": 1, "name": "Fresh Orchard Juice", "restricted": True},
{"id": 2, "name": "Nature Therapy", "restricted": True},
]},