forked from GithubBackups/healthchecks
Django 1.9
This commit is contained in:
parent
4d36764644
commit
1c2ee95968
@ -26,6 +26,7 @@ class NotifyTestCase(TestCase):
|
|||||||
@patch("hc.api.models.requests.get")
|
@patch("hc.api.models.requests.get")
|
||||||
def test_webhook(self, mock_get):
|
def test_webhook(self, mock_get):
|
||||||
self._setup_data("webhook", "http://example")
|
self._setup_data("webhook", "http://example")
|
||||||
|
mock_get.return_value.status_code = 200
|
||||||
|
|
||||||
self.channel.notify(self.check)
|
self.channel.notify(self.check)
|
||||||
mock_get.assert_called_with(u"http://example", timeout=5)
|
mock_get.assert_called_with(u"http://example", timeout=5)
|
||||||
@ -54,6 +55,8 @@ class NotifyTestCase(TestCase):
|
|||||||
@patch("hc.api.models.requests.post")
|
@patch("hc.api.models.requests.post")
|
||||||
def test_pd(self, mock_post):
|
def test_pd(self, mock_post):
|
||||||
self._setup_data("pd", "123")
|
self._setup_data("pd", "123")
|
||||||
|
mock_post.return_value.status_code = 200
|
||||||
|
|
||||||
self.channel.notify(self.check)
|
self.channel.notify(self.check)
|
||||||
assert Notification.objects.count() == 1
|
assert Notification.objects.count() == 1
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
django-appconf==1.0.1
|
django-appconf==1.0.1
|
||||||
django-ses-backend==0.1.1
|
django-ses-backend==0.1.1
|
||||||
Django==1.8.5
|
Django==1.9
|
||||||
django_compressor==1.5
|
django_compressor==1.5
|
||||||
djmail==0.11.0
|
djmail==0.11.0
|
||||||
futures==3.0.3
|
futures==3.0.3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user