Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/conftest.py
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | |||||
# Initialize tests data | # Initialize tests data | ||||
@pytest.fixture(autouse=True) | @pytest.fixture(autouse=True) | ||||
def tests_data(): | def tests_data(): | ||||
data = get_tests_data(reset=True) | data = get_tests_data(reset=True) | ||||
# Update swh-web configuration to use the in-memory storages | # Update swh-web configuration to use the in-memory storages | ||||
# instantiated in the tests.data module | # instantiated in the tests.data module | ||||
override_storages(data['storage'], data['idx_storage']) | override_storages(data['storage'], data['idx_storage'], data['search']) | ||||
return data | return data | ||||
# Fixture to manipulate data from a sample archive used in the tests | # Fixture to manipulate data from a sample archive used in the tests | ||||
@pytest.fixture | @pytest.fixture | ||||
def archive_data(tests_data): | def archive_data(tests_data): | ||||
return _ArchiveData(tests_data) | return _ArchiveData(tests_data) | ||||
▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines |