mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
mock s3upload
This commit is contained in:
@@ -2128,6 +2128,8 @@ def test_route_permissions_send_check_notifications(
|
|||||||
"app.notification_api_client.get_notifications_for_service",
|
"app.notification_api_client.get_notifications_for_service",
|
||||||
return_value=FAKE_ONE_OFF_NOTIFICATION,
|
return_value=FAKE_ONE_OFF_NOTIFICATION,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
mocker.patch("app.s3_client.s3_csv_client.s3upload")
|
||||||
validate_route_permission_with_client(
|
validate_route_permission_with_client(
|
||||||
mocker,
|
mocker,
|
||||||
client_request,
|
client_request,
|
||||||
@@ -2659,6 +2661,8 @@ def test_send_notification_submits_data(
|
|||||||
return_value=FAKE_ONE_OFF_NOTIFICATION,
|
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="")
|
mocker.patch("app.main.views.send.check_messages", return_value="")
|
||||||
|
|
||||||
client_request.post(
|
client_request.post(
|
||||||
@@ -2687,6 +2691,8 @@ def test_send_notification_clears_session(
|
|||||||
return_value=FAKE_ONE_OFF_NOTIFICATION,
|
return_value=FAKE_ONE_OFF_NOTIFICATION,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
mocker.patch("app.s3_client.s3_csv_client.s3upload")
|
||||||
|
|
||||||
client_request.post(
|
client_request.post(
|
||||||
"main.send_notification", service_id=service_one["id"], template_id=fake_uuid
|
"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,
|
return_value=FAKE_ONE_OFF_NOTIFICATION,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
mocker.patch("app.s3_client.s3_csv_client.s3upload")
|
||||||
|
|
||||||
client_request.post(
|
client_request.post(
|
||||||
"main.send_notification",
|
"main.send_notification",
|
||||||
service_id=SERVICE_ONE_ID,
|
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,
|
return_value=FAKE_ONE_OFF_NOTIFICATION,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
mocker.patch("app.s3_client.s3_csv_client.s3upload")
|
||||||
|
|
||||||
mocker.patch(
|
mocker.patch(
|
||||||
"app.notification_api_client.send_notification",
|
"app.notification_api_client.send_notification",
|
||||||
side_effect=MockHTTPError(),
|
side_effect=MockHTTPError(),
|
||||||
|
|||||||
Reference in New Issue
Block a user