diff --git a/tests/test_declarations.py b/tests/test_declarations.py index 59fc687639..49928ba3b2 100644 --- a/tests/test_declarations.py +++ b/tests/test_declarations.py @@ -380,7 +380,7 @@ def pwrite(fd: int, data: bytes, offset: int) -> int: comms.registry.register(Thread(name='b', tags=frozenset(), worktree='/wt')) monkeypatch.undo() with pytest.raises(RelationViolationError): - Registration(root / "registry.json") + Registration(root / "registry.json").require("a") @pytest.mark.skipif(os.name == "nt", reason="private POSIX ownership unavailable on Windows") @pytest.mark.parametrize("damage", ["missing", "corrupt", "truncated", "strip_epochs"]) diff --git a/tests/test_turn_record.py b/tests/test_turn_record.py index 23b1d99a18..ca96626fa8 100644 --- a/tests/test_turn_record.py +++ b/tests/test_turn_record.py @@ -36,7 +36,8 @@ def test_copied_registry_resolves_turn_from_its_new_location(tmp_path): forged = json.loads((copied / 'registry.json').read_text()) forged['threads']['worker']['turn_record']['lookup'] = 'wrong-identity' + (copied / 'registry.json').write_text(json.dumps(forged)) with pytest.raises(RelationViolationError): - moved._decode(forged) + RegistryStore(copied / 'registry.json').read_entry('worker')