Exemplo n.º 1
0
    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")
Exemplo n.º 2
0
    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")
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)