Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/tests/test_cli.py
Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | def test_cli_init_db_default_flavor(postgresql: psycopg2.extensions.connection) -> None: | ||||
result = CliRunner().invoke(swhmain, ["db", "init", "-d", dbname, "provenance"]) | result = CliRunner().invoke(swhmain, ["db", "init", "-d", dbname, "provenance"]) | ||||
assert result.exit_code == 0, result.output | assert result.exit_code == 0, result.output | ||||
with postgresql.cursor() as cur: | with postgresql.cursor() as cur: | ||||
cur.execute("select swh_get_dbflavor()") | cur.execute("select swh_get_dbflavor()") | ||||
assert cur.fetchone() == ("with-path",) | assert cur.fetchone() == ("with-path",) | ||||
@pytest.mark.origin_layer | |||||
@pytest.mark.parametrize( | @pytest.mark.parametrize( | ||||
"subcommand", | "subcommand", | ||||
(["origin", "from-csv"], ["iter-origins"]), | (["origin", "from-csv"], ["iter-origins"]), | ||||
) | ) | ||||
def test_cli_origin_from_csv( | def test_cli_origin_from_csv( | ||||
swh_storage: StorageInterface, | swh_storage: StorageInterface, | ||||
subcommand: List[str], | subcommand: List[str], | ||||
swh_storage_backend_config: Dict, | swh_storage_backend_config: Dict, | ||||
Show All 39 Lines |