From d04602c3aa253ab14ae94f2d9c586173ae91f5fe Mon Sep 17 00:00:00 2001 From: David McDonald Date: Wed, 2 Jun 2021 18:17:54 +0100 Subject: [PATCH] Fix incorrect test having channel as 'all' 'all' isn't a valid channel. It should be one of government, severe or test. I think this is a mistake and therefore this commit changes it to what it should be --- tests/app/main/views/test_service_settings.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index 8a0e823f6..fd414b20b 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -5751,17 +5751,19 @@ def test_post_service_set_broadcast_network( {'network_variant': ''}, # Missing choice of MNO ), ) +@pytest.mark.parametrize('broadcast_channel', ['government', 'severe', 'test']) def test_post_service_set_broadcast_network_makes_you_choose( client_request, platform_admin_user, mocker, data, + broadcast_channel ): client_request.login(platform_admin_user) page = client_request.post( 'main.service_set_broadcast_network', service_id=SERVICE_ONE_ID, - broadcast_channel='all', + broadcast_channel=broadcast_channel, _data=data, _expected_status=200, ) @@ -5893,7 +5895,7 @@ def test_post_service_set_broadcast_account_type_posts_data_to_api_and_redirects @pytest.mark.parametrize('endpoint, extra_args, expected_error', ( ('main.service_set_broadcast_channel', {}, 'Error: Select mode or channel'), - ('main.service_set_broadcast_network', {'broadcast_channel': 'all'}, 'Error: Select a mobile network'), + ('main.service_set_broadcast_network', {'broadcast_channel': 'government'}, 'Error: Select a mobile network'), )) def test_post_service_set_broadcast_account_type_shows_errors_if_no_radio_selected( platform_admin_client,