Esempio n. 1
0
 def test_response_not_200(self, mock_class):
     mock_class.return_value = MockResponse(query_success_res, 404)
     with self.assertRaises(SystemExit) as cm:
         response_post(query_req)
     self.assertEqual(cm.exception.code, 0)
Esempio n. 2
0
 def test_download_not_200(self, mock_class):
     mock_class.return_value = MockResponse(success_res, 404)
     with self.assertRaises(SystemExit) as cm:
         request_post("/api/v1/task/%s/_start" % task_id, query_req)
     self.assertEqual(cm.exception.code, 0)
 def test_response_not_200(self, mock_class):
     mock_class.return_value = MockResponse(success_res, 404)
     with self.assertRaises(SystemExit) as cm:
         response_get(path, task_id, None)
     self.assertEqual(cm.exception.code, 0)