diff options
Diffstat (limited to 'packages/meshbay-node/tests/test_cli_golden.py')
| -rw-r--r-- | packages/meshbay-node/tests/test_cli_golden.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/meshbay-node/tests/test_cli_golden.py b/packages/meshbay-node/tests/test_cli_golden.py index ddaa82f..3d7b0c0 100644 --- a/packages/meshbay-node/tests/test_cli_golden.py +++ b/packages/meshbay-node/tests/test_cli_golden.py @@ -27,6 +27,8 @@ from meshbay_node import config as config_mod from meshbay_node import daemon as daemon_mod from test_cli_dispatch import VERBS +from conftest import patch_cli + GOLDEN = Path(__file__).parent / "golden" / "cli.json" # The verbs that ask first, asked and answered "no": test_cli_dispatch.py # passes --yes to all of them. @@ -78,9 +80,9 @@ def _run(argv: list[str], tmp_path: Path, capsys) -> dict: conf.write_text('[hub]\nurl = "https://example.invalid"\n') code = 0 with pytest.MonkeyPatch.context() as mp: - mp.setattr(daemon_mod, "_daemon_api", fake_api) - mp.setattr(daemon_mod, "_resolve_group", lambda cfg, g: "g" * 32) - mp.setattr(daemon_mod, "DEFAULT_CONFIG_PATH", conf) + patch_cli(mp, "_daemon_api", fake_api) + patch_cli(mp, "_resolve_group", lambda cfg, g: "g" * 32) + patch_cli(mp, "DEFAULT_CONFIG_PATH", conf) # The data directory and the keystore's default path come from these; # left real, `status` would record the developer's own node. mp.setenv("HOME", str(tmp_path / "home")) |