Exemple #1
0
def test_response_exception(test_input, expected):
    response = Response(version='1.5', status_code=test_input, message='')
    response.status_code = test_input

    with pytest.raises(expected):
        Client._raise_response_exception(response)
Exemple #2
0
def test_response_exception_ok():
    response = Response(version='1.5', status_code=Status.EX_OK, message='')

    assert Client._raise_response_exception(response) is None