Need to remove priority logic

This commit is contained in:
Kenneth Kehl
2024-08-09 09:11:28 -07:00
parent fc87696818
commit 2e7e6e81fc
11 changed files with 5 additions and 192 deletions

View File

@@ -1113,49 +1113,6 @@ def test_create_template_raises_invalid_request_when_content_too_large(
}
@pytest.mark.parametrize(
"notification_type,send_to",
[
(NotificationType.SMS, "2028675309"),
(
NotificationType.EMAIL,
"sample@email.com",
),
],
)
def test_send_notification_uses_priority_queue_when_template_is_marked_as_priority(
client,
sample_service,
mocker,
notification_type,
send_to,
):
sample = create_template(
sample_service,
template_type=notification_type,
process_type=TemplateProcessType.PRIORITY,
)
mocked = mocker.patch(
f"app.celery.provider_tasks.deliver_{notification_type}.apply_async"
)
data = {"to": send_to, "template": str(sample.id)}
auth_header = create_service_authorization_header(service_id=sample.service_id)
response = client.post(
path=f"/notifications/{notification_type}",
data=json.dumps(data),
headers=[("Content-Type", "application/json"), auth_header],
)
response_data = json.loads(response.data)["data"]
notification_id = response_data["notification"]["id"]
assert response.status_code == 201
mocked.assert_called_once_with([notification_id], queue="priority-tasks")
@pytest.mark.parametrize(
"notification_type, send_to",
[