From 62ae2e96b742e197ae3bf321251952b6efc2c13a Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 18 Dec 2023 12:43:13 -0800 Subject: [PATCH] mock s3upload --- tests/app/main/views/test_send.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/app/main/views/test_send.py b/tests/app/main/views/test_send.py index d7bd05095..e4693f2c0 100644 --- a/tests/app/main/views/test_send.py +++ b/tests/app/main/views/test_send.py @@ -2128,6 +2128,8 @@ def test_route_permissions_send_check_notifications( "app.notification_api_client.get_notifications_for_service", return_value=FAKE_ONE_OFF_NOTIFICATION, ) + + mocker.patch("app.s3_client.s3_csv_client.s3upload") validate_route_permission_with_client( mocker, client_request, @@ -2659,6 +2661,8 @@ def test_send_notification_submits_data( return_value=FAKE_ONE_OFF_NOTIFICATION, ) + mocker.patch("app.s3_client.s3_csv_client.s3upload") + mocker.patch("app.main.views.send.check_messages", return_value="") client_request.post( @@ -2687,6 +2691,8 @@ def test_send_notification_clears_session( return_value=FAKE_ONE_OFF_NOTIFICATION, ) + mocker.patch("app.s3_client.s3_csv_client.s3upload") + client_request.post( "main.send_notification", service_id=service_one["id"], template_id=fake_uuid ) @@ -2749,6 +2755,8 @@ def test_send_notification_redirects_to_view_page( return_value=FAKE_ONE_OFF_NOTIFICATION, ) + mocker.patch("app.s3_client.s3_csv_client.s3upload") + client_request.post( "main.send_notification", service_id=SERVICE_ONE_ID, @@ -2854,6 +2862,8 @@ def test_send_notification_shows_email_error_in_trial_mode( return_value=FAKE_ONE_OFF_NOTIFICATION, ) + mocker.patch("app.s3_client.s3_csv_client.s3upload") + mocker.patch( "app.notification_api_client.send_notification", side_effect=MockHTTPError(),