def test_check_status_expect(self): api = MockApi(200) resp = MockResp(200) resp.caller = api resp.input_kwargs = None Consumer._check_status(resp)
def test_check_status_code_is_str(self): api = MockApi(200) resp = MockResp('200') resp.caller = api resp.input_kwargs = None Consumer._check_status(resp)
def test_check_status_not_expect(self): api = MockApi(200) resp = MockResp(401) resp.caller = api resp.input_kwargs = None with self.assertRaises(StatusCodeUnexpectedError): Consumer._check_status(resp)