Changeset View
Changeset View
Standalone View
Standalone View
swh/journal/tests/test_cli.py
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
@pytest.fixture | @pytest.fixture | ||||
def storage(): | def storage(): | ||||
"""An swh-storage object that gets injected into the CLI functions.""" | """An swh-storage object that gets injected into the CLI functions.""" | ||||
storage_config = { | storage_config = { | ||||
'cls': 'pipeline', | 'cls': 'pipeline', | ||||
'steps': [ | 'steps': [ | ||||
{'cls': 'validate'}, | |||||
{'cls': 'memory'}, | {'cls': 'memory'}, | ||||
] | ] | ||||
} | } | ||||
storage = get_storage(**storage_config) | storage = get_storage(**storage_config) | ||||
with patch('swh.journal.cli.get_storage') as get_storage_mock: | with patch('swh.journal.cli.get_storage') as get_storage_mock: | ||||
get_storage_mock.return_value = storage | get_storage_mock.return_value = storage | ||||
yield storage | yield storage | ||||
▲ Show 20 Lines • Show All 578 Lines • Show Last 20 Lines |