From f277dd1289d0d11a0bf632894583e82fa1081629 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 29 May 2023 07:01:35 -0700 Subject: [PATCH] more skips and xfails --- .../views/organisations/test_organisations.py | 58 ------------------- .../service_settings/test_service_settings.py | 10 +++- 2 files changed, 9 insertions(+), 59 deletions(-) diff --git a/tests/app/main/views/organisations/test_organisations.py b/tests/app/main/views/organisations/test_organisations.py index f4b99d723..2bb0eca14 100644 --- a/tests/app/main/views/organisations/test_organisations.py +++ b/tests/app/main/views/organisations/test_organisations.py @@ -262,64 +262,6 @@ def test_gps_can_create_own_organisations( ) -@pytest.mark.parametrize('organisation_type, organisation, expected_status', ( - ('nhs_local', None, 200), - ('nhs_gp', None, 403), - ('central', None, 403), - ('nhs_local', organisation_json(organisation_type='nhs_local'), 403), -)) -@pytest.mark.skip(reason='Update for TTS') -def test_nhs_local_can_create_own_organisations( - client_request, - mocker, - mock_get_service_organisation, - service_one, - organisation_type, - organisation, - expected_status, -): - mocker.patch('app.organisations_client.get_organisation', return_value=organisation) - mocker.patch( - 'app.models.organisation.AllOrganisations.client_method', - return_value=[ - organisation_json('t2', 'Trust 2', organisation_type='nhs_local'), - organisation_json('t1', 'Trust 1', organisation_type='nhs_local'), - organisation_json('gp1', 'GP 1', organisation_type='nhs_gp'), - organisation_json('c1', 'Central 1'), - ], - ) - service_one['organisation_type'] = organisation_type - - page = client_request.get( - '.add_organisation_from_nhs_local_service', - service_id=SERVICE_ONE_ID, - _expected_status=expected_status, - ) - - if expected_status == 403: - return - - assert normalize_spaces(page.select_one('main p').text) == ( - 'Which NHS Trust or Clinical Commissioning Group do you work for?' - ) - assert page.select_one('[data-module=live-search]')['data-targets'] == ( - '.govuk-radios__item' - ) - assert [ - ( - normalize_spaces(radio.select_one('label').text), - radio.select_one('input')['value'] - ) - for radio in page.select('.govuk-radios__item') - ] == [ - ('Trust 1', 't1'), - ('Trust 2', 't2'), - ] - assert normalize_spaces(page.select_one('.js-stick-at-bottom-when-scrolling button').text) == ( - 'Continue' - ) - - @pytest.mark.parametrize('data, expected_service_name', ( ( { diff --git a/tests/app/main/views/service_settings/test_service_settings.py b/tests/app/main/views/service_settings/test_service_settings.py index a9b5effb3..944e17f24 100644 --- a/tests/app/main/views/service_settings/test_service_settings.py +++ b/tests/app/main/views/service_settings/test_service_settings.py @@ -3500,7 +3500,7 @@ def test_cant_suspend_inactive_service( @pytest.mark.parametrize('user', ( create_platform_admin_user(), - pytest.param(create_active_user_with_permissions(), marks=pytest.mark.xfail), + create_active_user_with_permissions(), )) def test_resume_service_after_confirm( mocker, @@ -3513,6 +3513,14 @@ def test_resume_service_after_confirm( mock_event = mocker.patch('app.main.views.service_settings.create_resume_service_event') client_request.login(user) + if user['email_address'] != "platform@admin.gsa.gov": + client_request.post( + 'main.resume_service', + service_id=SERVICE_ONE_ID, + _expected_status=403, + ) + return + client_request.post( 'main.resume_service', service_id=SERVICE_ONE_ID,