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

  1. from hc.api.models import Channel, Check
  2. from hc.test import BaseTestCase
  3. class ApiAdminTestCase(BaseTestCase):
  4. def setUp(self):
  5. super().setUp()
  6. self.check = Check.objects.create(project=self.project, tags="foo bar")
  7. self.alice.is_staff = True
  8. self.alice.is_superuser = True
  9. self.alice.save()
  10. def test_it_shows_channel_list_with_pushbullet(self):
  11. self.client.login(username="[email protected]", password="password")
  12. Channel.objects.create(
  13. project=self.project, kind="pushbullet", value="test-token"
  14. )
  15. r = self.client.get("/admin/api/channel/")
  16. self.assertContains(r, "Pushbullet")