def test_it_handles_webhooks_with_no_urls(self):
    self.channel.kind = 'webhook'
    self.channel.value = json.dumps({'method_down': 'GET', 'url_down': '', 'body_down': '', 'headers_down': {}, 'method_up': 'GET', 'url_up': '', 'body_up': '', 'headers_up': {}})
    self.channel.save()
    self.client.login(username='example@example.com', password='password')
    r = self.client.post(self.url, {}, follow=True)
    self.assertRedirects(r, self.channels_url)
    self.assertContains(r, 'Could not send a test notification')
def test_it_handles_webhooks_with_no_urls(self):
    self.channel.kind = 'webhook'
    self.channel.value = json.dumps({'method_down': 'GET', 'url_down': , 'body_down': , 'headers_down': {}, 'method_up': 'GET', 'url_up': , 'body_up': , 'headers_up': {}})
    self.channel.save()
    self.client.login(username='example@example.com', password='password')
    r = self.client.post(self.url, {}, follow=True)
    self.assertRedirects(r, self.channels_url)
    self.assertContains(r, 'Could not send a test notification')