Skip to content

Commit

Permalink
[Fix] Fix wrong test
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrimiru committed Mar 29, 2018
1 parent 7a63ca0 commit 47ef9a5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hc/api/tests/test_notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,9 @@ def test_victorops(self, mock_post):

### Test that the web hooks handle connection errors and error 500s
@patch("hc.api.transports.requests.request")
def test_webhook_test(self, mock_get):
def test_webhook_connection_error(self, mock_get):
self._setup_data("webhook", "http://example")
n = mock_get.return_value.status_code = 500
resp = mock_get.return_value.status_code
resp = 500
self.channel.notify(self.check)
self.assertTrue(n, "Internal Server Error")
self.assertEqual(resp, 500)

0 comments on commit 47ef9a5

Please sign in to comment.