Skip to content

Commit

Permalink
Fix test_datadog_notify_calls_requests_post
Browse files Browse the repository at this point in the history
  • Loading branch information
winebarrel committed Sep 24, 2023
1 parent 1acd7bb commit 1ecc4ef
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/handlers/test_destinations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ecc4ef

Please sign in to comment.