diff --git a/swh/graph/tests/test_cli.py b/swh/graph/tests/test_cli.py --- a/swh/graph/tests/test_cli.py +++ b/swh/graph/tests/test_cli.py @@ -6,6 +6,7 @@ from pathlib import Path from tempfile import TemporaryDirectory from typing import Dict +from yaml import dump from click.testing import CliRunner @@ -34,10 +35,21 @@ runner = CliRunner() with TemporaryDirectory(suffix=".swh-graph-test") as tmpdir: + config_path = Path(tmpdir, "config.yml") + with open(config_path, "w") as f: + dump(config, f) + result = runner.invoke( cli, - ["compress", "--graph", DATA_DIR / "example", "--outdir", tmpdir], - obj={"config": config}, + [ + "--config-file", + config_path, + "compress", + "--graph", + DATA_DIR / "example", + "--outdir", + tmpdir, + ], ) assert result.exit_code == 0, result properties = read_properties(Path(tmpdir) / "example.properties")