Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/tests/conftest.py
Show All 36 Lines | |||||
@pytest.fixture | @pytest.fixture | ||||
def idx_storage(): | def idx_storage(): | ||||
"""An instance of in-memory indexer storage that gets injected into all | """An instance of in-memory indexer storage that gets injected into all | ||||
indexers classes. | indexers classes. | ||||
""" | """ | ||||
idx_storage = get_indexer_storage("memory", {}) | idx_storage = get_indexer_storage("memory") | ||||
with patch("swh.indexer.storage.in_memory.IndexerStorage") as idx_storage_mock: | with patch("swh.indexer.storage.in_memory.IndexerStorage") as idx_storage_mock: | ||||
idx_storage_mock.return_value = idx_storage | idx_storage_mock.return_value = idx_storage | ||||
yield idx_storage | yield idx_storage | ||||
@pytest.fixture | @pytest.fixture | ||||
def storage(): | def storage(): | ||||
"""An instance of in-memory storage that gets injected into all indexers | """An instance of in-memory storage that gets injected into all indexers | ||||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |