Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Improve the test that checks that update_alert_status is called to ac…
Browse files Browse the repository at this point in the history
…tually check that the REST endpoint is hit (#1628)
  • Loading branch information
arcrose committed May 12, 2020
1 parent 7ab2665 commit d1d3cb9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/mq/plugins/test_triage_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@ def test_process_invokes_update_for_good_messages(self):
mock.post(cfg.url + "/alertstatus", json={"error": None})
(new_msg, new_meta) = bot.process(msg, {}, cfg)

assert len(mock.request_history) == 1

req_json = mock.request_history[0].json()

assert req_json == {
"alert": "id",
"status": "acknowledged",
"user": {
"email": "tester@site.com",
"slack": "tester",
},
"identityConfidence": "high",
"response": "yes",
}

def test_process_reformats_messages_for_elasticsearch(self):
msg = {
"details": {
Expand Down

0 comments on commit d1d3cb9

Please sign in to comment.