|
@ -20,7 +20,7 @@ class FilteringRulesTestCase(BaseTestCase): |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
self.client.login(username="[email protected]", password="password") |
|
|
self.client.login(username="[email protected]", password="password") |
|
|
r = self.client.post(self.url, data=payload,) |
|
|
|
|
|
|
|
|
r = self.client.post(self.url, data=payload) |
|
|
self.assertRedirects(r, self.redirect_url) |
|
|
self.assertRedirects(r, self.redirect_url) |
|
|
|
|
|
|
|
|
self.check.refresh_from_db() |
|
|
self.check.refresh_from_db() |
|
@ -72,3 +72,19 @@ class FilteringRulesTestCase(BaseTestCase): |
|
|
|
|
|
|
|
|
self.check.refresh_from_db() |
|
|
self.check.refresh_from_db() |
|
|
self.assertFalse(self.check.manual_resume) |
|
|
self.assertFalse(self.check.manual_resume) |
|
|
|
|
|
|
|
|
|
|
|
def test_it_requires_rw_access(self): |
|
|
|
|
|
self.bobs_membership.rw = False |
|
|
|
|
|
self.bobs_membership.save() |
|
|
|
|
|
|
|
|
|
|
|
payload = { |
|
|
|
|
|
"subject": "SUCCESS", |
|
|
|
|
|
"subject_fail": "ERROR", |
|
|
|
|
|
"methods": "POST", |
|
|
|
|
|
"manual_resume": "1", |
|
|
|
|
|
"filter_by_subject": "yes", |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
self.client.login(username="[email protected]", password="password") |
|
|
|
|
|
r = self.client.post(self.url, payload) |
|
|
|
|
|
self.assertEqual(r.status_code, 403) |