Rename model to AllOrganisations

This makes it clearer that this model collection isn’t the organisations
for a user or a service or some other entity, like most model
collections are.

It will also lets us make a separate Organisations model, without the
name conflicting.
This commit is contained in:
Chris Hill-Scott
2021-09-28 09:02:15 +01:00
parent cbbc58e649
commit 029682d561
5 changed files with 10 additions and 10 deletions

View File

@@ -26,7 +26,7 @@ def test_organisation_page_shows_all_organisations(
]
get_organisations = mocker.patch(
'app.models.organisation.Organisations.client_method', return_value=orgs
'app.models.organisation.AllOrganisations.client_method', return_value=orgs
)
response = platform_admin_client.get(
url_for('.organisations')
@@ -274,7 +274,7 @@ def test_nhs_local_can_create_own_organisations(
):
mocker.patch('app.organisations_client.get_organisation', return_value=organisation)
mocker.patch(
'app.models.organisation.Organisations.client_method',
'app.models.organisation.AllOrganisations.client_method',
return_value=[
organisation_json('t1', 'Trust 1', organisation_type='nhs_local'),
organisation_json('t2', 'Trust 2', organisation_type='nhs_local'),
@@ -405,7 +405,7 @@ def test_nhs_local_assigns_to_selected_organisation(
mock_update_service_organisation,
):
mocker.patch(
'app.models.organisation.Organisations.client_method',
'app.models.organisation.AllOrganisations.client_method',
return_value=[
organisation_json(ORGANISATION_ID, 'Trust 1', organisation_type='nhs_local'),
],