diff --git a/hc/api/tests/test_notify.py b/hc/api/tests/test_notify.py index d65d6121..d9cc9e7e 100644 --- a/hc/api/tests/test_notify.py +++ b/hc/api/tests/test_notify.py @@ -283,6 +283,18 @@ class NotifyTestCase(BaseTestCase): self.assertEqual(payload["event_type"], "trigger") self.assertEqual(payload["service_key"], "456") + @patch("hc.api.transports.requests.request") + def test_pd(self, mock_post): + self._setup_data("pagertree", "123") + mock_post.return_value.status_code = 200 + + self.channel.notify(self.check) + assert Notification.objects.count() == 1 + + args, kwargs = mock_post.call_args + payload = kwargs["json"] + self.assertEqual(payload["event_type"], "trigger") + @patch("hc.api.transports.requests.request") def test_slack(self, mock_post): self._setup_data("slack", "123")