Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/debian/tests/conftest.py
Show All 9 Lines | |||||
from swh.lister.debian import debian_init | from swh.lister.debian import debian_init | ||||
@pytest.fixture | @pytest.fixture | ||||
def lister_debian(swh_listers): | def lister_debian(swh_listers): | ||||
lister = swh_listers['debian'] | lister = swh_listers['debian'] | ||||
# Initialize the debian data model | # Initialize the debian data model | ||||
debian_init(lister.db_engine, lister=lister, | debian_init(lister.db_engine, | ||||
distributions=['stretch'], | distributions=['stretch'], | ||||
area_names=['main', 'contrib']) | area_names=['main', 'contrib']) | ||||
# Add the load-deb-package in the scheduler backend | # Add the load-deb-package in the scheduler backend | ||||
lister.scheduler.create_task_type({ | lister.scheduler.create_task_type({ | ||||
'type': 'load-deb-package', | 'type': 'load-deb-package', | ||||
'description': 'Load a Debian package', | 'description': 'Load a Debian package', | ||||
'backend_name': 'swh.loader.debian.tasks.LoaderDebianPackage', | 'backend_name': 'swh.loader.debian.tasks.LoaderDebianPackage', | ||||
'default_interval': '1 day', | 'default_interval': '1 day', | ||||
}) | }) | ||||
return lister | return lister |