

@patch('hc.api.transports.requests.request')
def test_victorops(self, mock_post):
    self._setup_data('victorops', '123')
    mock_post.return_value.status_code = 200
    self.channel.notify(self.check)
    assert (Notification.objects.count() == 1)
    (args, kwargs) = mock_post.call_args
    json = kwargs['json']
    self.assertEqual(json['message_type'], 'CRITICAL')

dataset/ETHPy150Open healthchecks/healthchecks/hc/api/tests/test_notify.py NotifyTestCase.test_victorops/original