|
|
@ -51,3 +51,11 @@ class SwitchChannelTestCase(BaseTestCase): |
|
|
|
self.client.login(username="[email protected]", password="password") |
|
|
|
r = self.client.post(self.url, {"state": "on"}) |
|
|
|
self.assertEqual(r.status_code, 200) |
|
|
|
|
|
|
|
def test_it_requires_rw_access(self): |
|
|
|
self.bobs_membership.rw = False |
|
|
|
self.bobs_membership.save() |
|
|
|
|
|
|
|
self.client.login(username="[email protected]", password="password") |
|
|
|
r = self.client.post(self.url, {"state": "on"}) |
|
|
|
self.assertEqual(r.status_code, 403) |