Example #1
0
 def test_DELETE_admin_only(self):
     script = factory.make_Script()
     response = self.client.delete(self.get_script_uri(script))
     self.assertThat(response, HasStatusCode(http.client.FORBIDDEN))
     self.assertIsNotNone(reload_object(script))
Example #2
0
 def test_POST_requires_admin(self):
     response = self.client.post(self.get_scripts_uri())
     self.assertThat(response, HasStatusCode(http.client.FORBIDDEN))