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
819 B

from hc.api.models import Channel
from hc.test import BaseTestCase
class AddMsTeamsTestCase(BaseTestCase):
def test_instructions_work(self):
self.client.login(username="[email protected]", password="password")
r = self.client.get("/integrations/add_msteams/")
self.assertContains(r, "Integration Settings", status_code=200)
def test_it_works(self):
form = {"value": "https://example.com/foo"}
self.client.login(username="[email protected]", password="password")
r = self.client.post("/integrations/add_msteams/", form)
self.assertRedirects(r, "/integrations/")
c = Channel.objects.get()
self.assertEqual(c.kind, "msteams")
self.assertEqual(c.value, "https://example.com/foo")
self.assertEqual(c.project, self.project)