def test_http_post_handler_on_200(self): responses.add(responses.POST, Configs.stratos_api_url, body='{"keyOne": "valueOne"}', status=200, content_type='application/json') r = Stratos.post("") assert r is True
def test_http_post_handler_on_500(self): responses.add(responses.POST, Configs.stratos_api_url, body='', status=500, content_type='application/json') self.assertRaises(BadResponseError, Stratos.post(""))
def test_http_get_handler_on_404(self): responses.add(responses.GET, Configs.stratos_api_url, body='', status=404, content_type='application/json') self.assertRaises(BadResponseError, Stratos.get(""))