From 38c2b32fa84c6056b20a193b9b3ca646928a465e Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 27 Aug 2019 16:26:50 +0100 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=98GP=E2=80=99=20as=20an=20organisa?= =?UTF-8?q?tion=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Although their allowances are the same as what we call `nhs_local` it makes more sense to store them separately because: - we already present them as two separate choices to the user - we may want to handle them differently in the future, eg in terms of what branding choices are available to them Once the API is updated we can start passing in this new value from the admin app. --- app/main/forms.py | 2 +- app/models/organisation.py | 2 +- tests/app/main/views/organisations/test_organisation.py | 4 ++-- tests/app/main/views/test_add_service.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index e5a084cd7..4dcf5818e 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -602,7 +602,7 @@ class CreateServiceForm(StripWhitespaceForm): class CreateNhsServiceForm(CreateServiceForm): organisation_type = OrganisationTypeField( 'Who runs this service?', - include_only={'nhs_central', 'nhs_local'} + include_only={'nhs_central', 'nhs_local', 'nhs_gp'}, ) diff --git a/app/models/organisation.py b/app/models/organisation.py index 960b38b5f..7ca83be26 100644 --- a/app/models/organisation.py +++ b/app/models/organisation.py @@ -12,7 +12,7 @@ class Organisation(JSONModel): ('local', 'Local government'), ('nhs_central', 'NHS – central government agency or public body'), ('nhs_local', 'NHS Trust or Clinical Commissioning Group'), - ('nhs_local', 'GP practice'), + ('nhs_gp', 'GP practice'), ('emergency_service', 'Emergency service'), ('school_or_college', 'School or college'), ('other', 'Other'), diff --git a/tests/app/main/views/organisations/test_organisation.py b/tests/app/main/views/organisations/test_organisation.py index cd7cd37fb..9a9817783 100644 --- a/tests/app/main/views/organisations/test_organisation.py +++ b/tests/app/main/views/organisations/test_organisation.py @@ -92,7 +92,7 @@ def test_page_to_create_new_organisation( ('radio', 'organisation_type', 'local'), ('radio', 'organisation_type', 'nhs_central'), ('radio', 'organisation_type', 'nhs_local'), - ('radio', 'organisation_type', 'nhs_local'), + ('radio', 'organisation_type', 'nhs_gp'), ('radio', 'organisation_type', 'emergency_service'), ('radio', 'organisation_type', 'school_or_college'), ('radio', 'organisation_type', 'other'), @@ -282,7 +282,7 @@ def test_organisation_settings_for_platform_admin( ('local', 'Local government'), ('nhs_central', 'NHS – central government agency or public body'), ('nhs_local', 'NHS Trust or Clinical Commissioning Group'), - ('nhs_local', 'GP practice'), + ('nhs_gp', 'GP practice'), ('emergency_service', 'Emergency service'), ('school_or_college', 'School or college'), ('other', 'Other'), diff --git a/tests/app/main/views/test_add_service.py b/tests/app/main/views/test_add_service.py index 2a6910067..539a80132 100644 --- a/tests/app/main/views/test_add_service.py +++ b/tests/app/main/views/test_add_service.py @@ -55,7 +55,7 @@ def test_get_should_render_add_service_template( 'local', 'nhs_central', 'nhs_local', - 'nhs_local', + 'nhs_gp', 'emergency_service', 'school_or_college', 'other', @@ -205,7 +205,7 @@ def test_get_should_only_show_nhs_org_types_radios_if_user_has_nhs_email( ] == [ 'nhs_central', 'nhs_local', - 'nhs_local', + 'nhs_gp', ]