

@patch('hc.api.transports.requests.request')
def test_webhooks_handle_500(self, mock_get):
    self._setup_data('webhook', 'http://example')
    mock_get.return_value.status_code = 500
    self.channel.notify(self.check)
    n = Notification.objects.get()
    self.assertEqual(n.error, 'Received status code 500')

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