fix: harden Python workflow client boundary

This commit is contained in:
lda
2026-08-31 19:51:43 +07:00 Verified
parent b377311a6e
commit 4f946a35ef
35 changed files with 1257 additions and 302 deletions
+7 -2
View File
@@ -18,7 +18,9 @@ def _manifest() -> ContractManifest:
return manifest_from_openrpc(synthetic_openrpc_document())
def test_write_generates_once_and_writes_requested_contract(monkeypatch, tmp_path: Path) -> None:
def test_write_generates_once_and_writes_requested_contract(
monkeypatch, tmp_path: Path
) -> None:
manifest = _manifest()
calls: list[tuple[object, Path]] = []
generate_calls = 0
@@ -35,7 +37,10 @@ def test_write_generates_once_and_writes_requested_contract(monkeypatch, tmp_pat
"wf_contract_manifest.__main__.write_manifest",
lambda value, path: calls.append((value, path)) or path,
)
monkeypatch.setattr("wf_contract_manifest.__main__.DEFAULT_MANIFEST_PATH", tmp_path / "manifest.json")
monkeypatch.setattr(
"wf_contract_manifest.__main__.DEFAULT_MANIFEST_PATH",
tmp_path / "manifest.json",
)
assert main(["write"]) == 0
assert calls == [(manifest, tmp_path / "manifest.json")]