From edb5790b7c8843bfd660183191d02b2d623f622e Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 28 Aug 2019 15:21:59 +0100 Subject: [PATCH] Use `nhs_gp` not `gp` as org type Means we have the option of looking for anything starting with `nhs` as a way of filtering organisations. --- app/models.py | 4 ++-- migrations/versions/0305_add_gp_org_type.py | 2 +- tests/app/organisation/test_rest.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models.py b/app/models.py index d4e2da9f0..20c4ba5af 100644 --- a/app/models.py +++ b/app/models.py @@ -326,11 +326,11 @@ class Domain(db.Model): ORGANISATION_TYPES = [ - "central", "local", "nhs_central", "nhs_local", "gp", "emergency_service", "school_or_college", "other", + "central", "local", "nhs_central", "nhs_local", "nhs_gp", "emergency_service", "school_or_college", "other", ] CROWN_ORGANISATION_TYPES = ["nhs_central"] -NON_CROWN_ORGANISATION_TYPES = ["local", "nhs_local", "gp", "emergency_service", "school_or_college"] +NON_CROWN_ORGANISATION_TYPES = ["local", "nhs_local", "nhs_gp", "emergency_service", "school_or_college"] class OrganisationTypes(db.Model): diff --git a/migrations/versions/0305_add_gp_org_type.py b/migrations/versions/0305_add_gp_org_type.py index 3ac230683..3e1d11564 100644 --- a/migrations/versions/0305_add_gp_org_type.py +++ b/migrations/versions/0305_add_gp_org_type.py @@ -12,7 +12,7 @@ from alembic import op revision = '0305_add_gp_org_type' down_revision = '0304_remove_org_to_service' -GP_ORG_TYPE_NAME = 'gp' +GP_ORG_TYPE_NAME = 'nhs_gp' def upgrade(): diff --git a/tests/app/organisation/test_rest.py b/tests/app/organisation/test_rest.py index 5dbd6cd67..633f8338f 100644 --- a/tests/app/organisation/test_rest.py +++ b/tests/app/organisation/test_rest.py @@ -206,7 +206,7 @@ def test_post_create_organisation_existing_name_raises_400(admin_request, sample 'organisation_type': 'foo', }, ( 'organisation_type foo is not one of ' - '[central, local, nhs_central, nhs_local, gp, emergency_service, school_or_college, other]' + '[central, local, nhs_central, nhs_local, nhs_gp, emergency_service, school_or_college, other]' )), )) def test_post_create_organisation_with_missing_data_gives_validation_error(