def test_raise_for_undefined_status(): r = Response(version='1.5', status_code=999, message='') with pytest.raises(ResponseException): r.raise_for_status()
def test_raise_for_status_ok(): r = Response(version='1.5', status_code=Status.EX_OK, message='') assert r.raise_for_status() is None
def test_raise_for_status(test_input): r = Response(version='1.5', status_code=test_input, message='') with pytest.raises(test_input.exception): r.raise_for_status()