Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/tests/test_cli.py
Show All 9 Lines | |||||
from .test_utils import init_db | from .test_utils import init_db | ||||
lister_args = { | lister_args = { | ||||
"phabricator": { | "phabricator": { | ||||
"instance": "softwareheritage", | "instance": "softwareheritage", | ||||
"url": "https://forge.softwareheritage.org/api/diffusion.repository.search", | "url": "https://forge.softwareheritage.org/api/diffusion.repository.search", | ||||
"api_token": "bogus", | "api_token": "bogus", | ||||
}, | }, | ||||
"gitea": {"url": "https://try.gitea.io/api/v1/",}, | |||||
} | } | ||||
def test_get_lister_wrong_input(): | def test_get_lister_wrong_input(): | ||||
"""Unsupported lister should raise""" | """Unsupported lister should raise""" | ||||
with pytest.raises(ValueError) as e: | with pytest.raises(ValueError) as e: | ||||
get_lister("unknown", "db-url") | get_lister("unknown", "db-url") | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |