Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/tests/test_cli.py
Show All 12 Lines | "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",}, | "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",}, | ||||
"opam": {"url": "https://opam.ocaml.org", "instance": "opam"}, | "opam": {"url": "https://opam.ocaml.org", "instance": "opam"}, | ||||
"maven": { | |||||
"url": "https://repo1.maven.org/maven2/", | |||||
"index_url": "http://indexes/export.fld", | |||||
}, | |||||
} | } | ||||
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 16 Lines |