def test_default_error(self, server_error): with pytest.raises(RestError): handle_response_failure(server_error)
def test_validation_error(self, client_error): with pytest.raises(ValidationError): handle_response_failure(client_error)
def test_connection_error(self, connection_error): with pytest.raises(RestConnectionError): handle_response_failure(connection_error)
def test_too_large_error(self, too_large): with pytest.raises(TooLargeError): handle_response_failure(too_large)
def test_conflict_error(self, conflict): with pytest.raises(ConflictError): handle_response_failure(conflict)
def test_wait_exceeded_error(self, wait_exceeded): with pytest.raises(WaitExceededError): handle_response_failure(wait_exceeded)
def test_not_found_error(self, not_found): with pytest.raises(NotFoundError): handle_response_failure(not_found)
def test_not_found_allowed(self, not_found): assert handle_response_failure(not_found, raise_404=False) is None