More fixes, removing literal "created" from code.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-02-21 11:27:38 -05:00
parent 15eeac6367
commit 43a8b6539f
13 changed files with 95 additions and 72 deletions

View File

@@ -535,7 +535,7 @@ def test_should_not_persist_or_send_notification_if_simulated_recipient(
client, recipient, notification_type, sample_email_template, sample_template, mocker
):
apply_async = mocker.patch(
"app.celery.provider_tasks.deliver_{}.apply_async".format(notification_type)
f"app.celery.provider_tasks.deliver_{notification_type}.apply_async"
)
if notification_type == NotificationType.SMS:
@@ -1194,7 +1194,7 @@ def test_post_notification_returns_201_when_content_type_is_missing_but_payload_
valid_json = {
"template_id": str(template.id),
}
if notification_type == "email":
if notification_type == NotificationType.EMAIL:
valid_json.update({"email_address": sample_service.users[0].email_address})
else:
valid_json.update({"phone_number": "+447700900855"})

View File

@@ -80,14 +80,14 @@ invalid_json_post_args = [
valid_json_post_response = {
"id": str(uuid.uuid4()),
"type": "email",
"type": TemplateType.EMAIL,
"version": 1,
"body": "some body",
}
valid_json_post_response_with_optionals = {
"id": str(uuid.uuid4()),
"type": "email",
"type": TemplateType.EMAIL,
"version": 1,
"body": "some body",
"subject": "some subject",