Skip to content

Commit

Permalink
[Feature #145186283] Set Alice as super user and staff
Browse files Browse the repository at this point in the history
git commit -m [Feature
  • Loading branch information
WNjihia committed May 15, 2017
1 parent 9a020e1 commit afb72e5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hc/api/tests/test_admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from hc.api.models import Channel, Check
from hc.test import BaseTestCase
from django.contrib.auth.models import User


class ApiAdminTestCase(BaseTestCase):
Expand All @@ -8,13 +9,15 @@ def setUp(self):
super(ApiAdminTestCase, self).setUp()
self.check = Check.objects.create(user=self.alice, tags="foo bar")


### Set Alice to be staff and superuser and save her :)
self.alice.is_superuser = True
self.alice.is_staff = True
self.alice.save()

def test_it_shows_channel_list_with_pushbullet(self):
self.client.login(username="alice@example.org", password="password")

ch = Channel(user=self.alice, kind="pushbullet", value="test-token")
ch.save()

### Assert for the push bullet

0 comments on commit afb72e5

Please sign in to comment.