You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

21 lines
746 B

from django.test.utils import override_settings
from hc.test import BaseTestCase
@override_settings(PD_APP_ID="abc")
class AddPdcHelpTestCase(BaseTestCase):
url = "/integrations/pagerduty/"
def test_instructions_work_when_not_logged_in(self):
r = self.client.get(self.url)
self.assertContains(r, "Before adding PagerDuty integration, please log")
def test_instructions_work(self):
self.client.login(username="[email protected]", password="password")
r = self.client.get(self.url)
self.assertContains(r, "If your team uses")
@override_settings(PD_APP_ID=None)
def test_it_requires_vendor_key(self):
r = self.client.get(self.url)
self.assertEqual(r.status_code, 404)