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
687 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(ApiAdminTestCase, self).setUp()
  6. self.check = Check.objects.create(user=self.alice, 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. ch = Channel(user=self.alice, kind="pushbullet", value="test-token")
  13. ch.save()
  14. r = self.client.get("/admin/api/channel/")
  15. self.assertContains(r, "Pushbullet")