Skip to content

The agent that grows with you

test(gateway): legacy image verbs answer -32601, the JSON-RPC unknown-method verdict

teknium1855a4ed6419f
diff --git a/tests/gateway/test_session_images.py b/tests/gateway/test_session_images.py
index fb7b5f04150..ad2c002ce59 100644
--- a/tests/gateway/test_session_images.py
+++ b/tests/gateway/test_session_images.py
@@ -64,9 +64,11 @@ async def test_upload_is_authorized_private_staging_not_legacy_execution(tmp_pat
assert denied['error']['message'] == 'invalid_params', denied
assert sorted((home / 'cache/images').iterdir()) == before
assert not (tmp_path / 'wrong-home/cache/images').exists()
+ # The legacy image verbs do not exist on the authority: JSON-RPC's own verdict, never
+ # a stealth alias onto the staging path.
for method in ('image.attach', 'clipboard.paste'):
denied = await owner.dispatch({'id': 2, 'method': method, 'params': params})
- assert denied['error']['message'] == 'invalid_params'
+ assert denied['error']['code'] == -32601, denied
await owner.close()