Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/tests/test_cli.py
Show All 30 Lines | |||||
def test_get_lister(swh_scheduler_config): | def test_get_lister(swh_scheduler_config): | ||||
"""Instantiating a supported lister should be ok | """Instantiating a supported lister should be ok | ||||
""" | """ | ||||
db_url = init_db().url() | db_url = init_db().url() | ||||
# Drop launchpad lister from the lister to check, its test setup is more involved | # Drop launchpad lister from the lister to check, its test setup is more involved | ||||
# than the other listers and it's not currently done here | # than the other listers and it's not currently done here | ||||
supported_listers = set(SUPPORTED_LISTERS) - {"launchpad"} | for lister_name in SUPPORTED_LISTERS: | ||||
for lister_name in supported_listers: | |||||
lst = get_lister( | lst = get_lister( | ||||
lister_name, | lister_name, | ||||
db_url, | db_url, | ||||
scheduler={"cls": "local", **swh_scheduler_config}, | scheduler={"cls": "local", **swh_scheduler_config}, | ||||
**lister_args.get(lister_name, {}), | **lister_args.get(lister_name, {}), | ||||
) | ) | ||||
assert hasattr(lst, "run") | assert hasattr(lst, "run") |