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.
 
 
 
 
 

22 lines
688 B

from hc.api.models import Channel, Check
from hc.test import BaseTestCase
class ApiAdminTestCase(BaseTestCase):
def setUp(self):
super().setUp()
self.check = Check.objects.create(project=self.project, tags="foo bar")
self.alice.is_staff = True
self.alice.is_superuser = True
self.alice.save()
def test_it_shows_channel_list_with_pushbullet(self):
self.client.login(username="[email protected]", password="password")
Channel.objects.create(
project=self.project, kind="pushbullet", value="test-token"
)
r = self.client.get("/admin/api/channel/")
self.assertContains(r, "Pushbullet")