def test_modify_has_to_have_actions(self, requests_post): # config doesn't have actions config = {} with self.assertRaises(Exception) as cm: returned_items = modify(config) self.assertEquals(cm.exception.message, "Actions are not in the request body")
def test_modify_has_to_have_actions(self, requests_post): # config doesn't have actions config = {} with self.assertRaises(Exception) as cm: returned_items = modify(config) self.assertEquals( cm.exception.message, "Actions are not in the request body")
def test_modify_bad_request(self, requests_post): requests_post = self.patch_requests(requests_post, status_code=400) # config doesn't matter config = {"actions": ["something something"]} with self.assertRaises(SystemExit) as cm: modify(config)