mock s3upload

This commit is contained in:
Kenneth Kehl
2023-12-18 12:43:13 -08:00
parent bab0b53ffb
commit 62ae2e96b7

View File

@@ -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(),