diff --git a/swh/core/api/__init__.py b/swh/core/api/__init__.py --- a/swh/core/api/__init__.py +++ b/swh/core/api/__init__.py @@ -179,7 +179,7 @@ post_data.pop("db", None) # Send the request. - return self.post(meth._endpoint_path, post_data) + return self._post(meth._endpoint_path, post_data) if meth_name not in attributes: attributes[meth_name] = meth_ diff --git a/swh/core/api/tests/test_rpc_client.py b/swh/core/api/tests/test_rpc_client.py --- a/swh/core/api/tests/test_rpc_client.py +++ b/swh/core/api/tests/test_rpc_client.py @@ -104,7 +104,7 @@ ) with pytest.raises(APIError) as exc_info: - rpc_client.post("connection_error", data={}) + rpc_client._post("connection_error", data={}) assert type(exc_info.value.args[0]) == ConnectionError assert str(exc_info.value.args[0]) == error_message @@ -142,7 +142,7 @@ ) with pytest.raises(ReraiseException) as exc_info: - rpc_client.post(endpoint, data={}) + rpc_client._post(endpoint, data={}) assert str(exc_info.value) == error_message @@ -171,7 +171,7 @@ ) with pytest.raises(RemoteException) as exc_info: - rpc_client.post(endpoint, data={}) + rpc_client._post(endpoint, data={}) assert str(exc_info.value.args[0]["type"]) == "Exception" assert str(exc_info.value.args[0]["message"]) == error_message