def test_handle_http_error_404_handling(): with pytest.raises(HTTPError, match="invalid id"): handle_http_error(404)
def test_handle_http_error_no_error(): assert handle_http_error(200) is None assert handle_http_error(302) is None
def test_handle_http_error(): with pytest.raises(HTTPError): handle_http_error(400) with pytest.raises(HTTPError): handle_http_error(500)