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 @@ -313,9 +313,10 @@ **kwargs): super().__init__(*args, **kwargs) + self.backend_class = backend_class if backend_class is not None: if backend_factory is None: - raise TypeError('Missing argument backend_factory') + backend_factory = backend_class for (meth_name, meth) in backend_class.__dict__.items(): if hasattr(meth, '_endpoint_path'): self.__add_endpoint(meth_name, meth, backend_factory)