Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/tests/test_cli.py
Show All 9 Lines | |||||
lister_args = { | lister_args = { | ||||
"cgit": {"url": "https://git.eclipse.org/c/",}, | "cgit": {"url": "https://git.eclipse.org/c/",}, | ||||
"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/",}, | "gitea": {"url": "https://try.gitea.io/api/v1/",}, | ||||
"tuleap": {"url": "https://tuleap.net",}, | |||||
"gitlab": {"url": "https://gitlab.ow2.org/api/v4", "instance": "ow2",}, | "gitlab": {"url": "https://gitlab.ow2.org/api/v4", "instance": "ow2",}, | ||||
} | } | ||||
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 All 17 Lines |