diff --git a/swh/indexer/tests/conftest.py b/swh/indexer/tests/conftest.py --- a/swh/indexer/tests/conftest.py +++ b/swh/indexer/tests/conftest.py @@ -116,10 +116,9 @@ """ objstorage = get_objstorage(**swh_indexer_config["objstorage"]) + print("mocked %r" % objstorage) fill_obj_storage(objstorage) - with patch.dict( - "swh.objstorage.factory._STORAGE_CLASSES", {"memory": lambda: objstorage} - ): + with patch("swh.indexer.indexer.get_objstorage", return_value=objstorage): yield objstorage