diff --git a/tests/app/main/views/test_send.py b/tests/app/main/views/test_send.py index 65d292e62..66fd846b1 100644 --- a/tests/app/main/views/test_send.py +++ b/tests/app/main/views/test_send.py @@ -675,7 +675,7 @@ def test_go_to_dashboard_after_tour( mock_delete_service_template.assert_called_once_with(fake_uuid, fake_uuid) -@pytest.mark.parametrize('num_requested,msg', [ +@pytest.mark.parametrize('num_requested,expected_msg', [ (0, '‘valid.csv’ contains 100 phone numbers.'), (1, 'You can still send 49 messages today, but ‘valid.csv’ contains 100 phone numbers.') ], ids=['none_sent', 'some_sent']) @@ -690,7 +690,7 @@ def test_check_messages_shows_too_many_messages_errors( mock_has_permissions, fake_uuid, num_requested, - msg + expected_msg ): # csv with 100 phone numbers mocker.patch('app.main.views.send.s3download', return_value=',\n'.join( @@ -726,4 +726,4 @@ def test_check_messages_shows_too_many_messages_errors( # remove excess whitespace from element details = page.find('div', class_='banner-dangerous').findAll('p')[1] details = ' '.join([line.strip() for line in details.text.split('\n') if line.strip() != '']) - assert details == msg + assert details == expected_msg diff --git a/tests/app/notify_client/test_service_api_client.py b/tests/app/notify_client/test_service_api_client.py index 125980b46..57557936e 100644 --- a/tests/app/notify_client/test_service_api_client.py +++ b/tests/app/notify_client/test_service_api_client.py @@ -33,7 +33,7 @@ def test_client_posts_archived_true_when_deleting_template(mocker): ) def test_client_gets_service(mocker, function, params): client = ServiceAPIClient() - mock_post = mocker.patch.object(client, 'get') + mock_get = mocker.patch.object(client, 'get') function(client, 'foo') - mock_post.assert_called_once_with('/service/foo', params=params) + mock_get.assert_called_once_with('/service/foo', params=params)