From 1ecc4ef27ef0217f6d4d35da0fa2c4551a942fae Mon Sep 17 00:00:00 2001 From: winebarrel Date: Sun, 24 Sep 2023 13:29:37 +0900 Subject: [PATCH] Fix test_datadog_notify_calls_requests_post --- tests/handlers/test_destinations.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/handlers/test_destinations.py b/tests/handlers/test_destinations.py index 63a21997bc..5ae566481d 100644 --- a/tests/handlers/test_destinations.py +++ b/tests/handlers/test_destinations.py @@ -251,13 +251,11 @@ def test_webex_notify_calls_requests_post(): def test_datadog_notify_calls_requests_post(): - alert = mock.Mock(spec_set=["id", "name", "options", "render_template"]) + alert = mock.Mock(spec_set=["id", "name", "custom_subject", "custom_body", "render_template"]) alert.id = 1 alert.name = "Test Alert" - alert.options = { - "custom_subject": "Test custom subject", - "custom_body": "Test custom body", - } + alert.custom_subject = "Test custom subject" + alert.custom_body = "Test custom body" alert.render_template = mock.Mock(return_value={"Rendered": "template"}) query = mock.Mock() query.id = 1