mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 17:38:50 -04:00
try mock
This commit is contained in:
@@ -995,9 +995,9 @@ def send_notification(service_id, template_id):
|
||||
|
||||
def _send_notification(service_id, template_id):
|
||||
scheduled_for = session.pop("scheduled_for", "")
|
||||
print("GOING TO GET RECIPIENT") # noqa
|
||||
print("GOING TO GET RECIPIENT") # noqa
|
||||
recipient = get_recipient()
|
||||
print(f"RECIPIENT IS {recipient}, redirecting if None") # noqa
|
||||
print(f"RECIPIENT IS {recipient}, redirecting if None") # noqa
|
||||
|
||||
if not recipient:
|
||||
return redirect(
|
||||
|
||||
@@ -2815,15 +2815,11 @@ def test_send_notification_clears_session(
|
||||
],
|
||||
)
|
||||
def test_send_notification_redirects_if_missing_data(
|
||||
client_request,
|
||||
fake_uuid,
|
||||
session_data,
|
||||
mocker
|
||||
client_request, fake_uuid, session_data, mocker
|
||||
):
|
||||
with client_request.session_transaction() as session:
|
||||
session.update(session_data)
|
||||
|
||||
|
||||
mocker.patch("app.main.views.send.s3upload", return_value=sample_uuid())
|
||||
client_request.post(
|
||||
"main.send_notification",
|
||||
|
||||
Reference in New Issue
Block a user