def test_check_raises_not_found(self): response = Mock() response.status = 404 with py.test.raises(exc.NotFound): client.check_result_status(response)
def test_check_does_not_raise_http_error(self, code): response = Mock() response.status = code assert client.check_result_status(response) is None
def test_check_raises_http_error(self, code): response = Mock() response.status = code with py.test.raises(exc.HttpError): client.check_result_status(response)