mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-23 15:56:45 -04:00
fuzz
This commit is contained in:
@@ -24,6 +24,7 @@ def test_fuzz_send_email_notification(
|
|||||||
sample_service,
|
sample_service,
|
||||||
sample_template,
|
sample_template,
|
||||||
notify_db_session,
|
notify_db_session,
|
||||||
|
sample_email_notification,
|
||||||
):
|
):
|
||||||
@given(
|
@given(
|
||||||
st.emails(),
|
st.emails(),
|
||||||
@@ -44,7 +45,12 @@ def test_fuzz_send_email_notification(
|
|||||||
"personalisation": personalisation,
|
"personalisation": personalisation,
|
||||||
"reference": reference,
|
"reference": reference,
|
||||||
}
|
}
|
||||||
response = client.post("/notifications/email", json=payload)
|
auth_header = create_service_authorization_header(
|
||||||
|
service_id=sample_email_notification.service_id
|
||||||
|
)
|
||||||
|
response = client.post(
|
||||||
|
"/notifications/email", json=payload, headers=[auth_header]
|
||||||
|
)
|
||||||
assert response.status_code in (
|
assert response.status_code in (
|
||||||
201,
|
201,
|
||||||
400,
|
400,
|
||||||
|
|||||||
Reference in New Issue
Block a user