mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-16 10:12:32 -05:00
fuzz
This commit is contained in:
@@ -37,18 +37,14 @@ def test_fuzz_send_email_notification(
|
|||||||
def inner(email_address, personalisation, reference):
|
def inner(email_address, personalisation, reference):
|
||||||
|
|
||||||
template_id = str(sample_template.id)
|
template_id = str(sample_template.id)
|
||||||
auth_header = {
|
|
||||||
"Authorization": "ApiKey-v1 {}".format(sample_service.api_keys[0].secret)
|
|
||||||
}
|
|
||||||
payload = {
|
payload = {
|
||||||
"template_id": template_id,
|
"template_id": template_id,
|
||||||
"email_address": email_address,
|
"email_address": email_address,
|
||||||
"personalisation": personalisation,
|
"personalisation": personalisation,
|
||||||
"reference": reference,
|
"reference": reference,
|
||||||
}
|
}
|
||||||
response = client.post(
|
response = client.post("/notifications/email", json=payload)
|
||||||
"/v2/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