We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a90ca6 commit dad69bfCopy full SHA for dad69bf
tests/test_server.py
@@ -382,3 +382,14 @@ async def test_main_run_error(mocker: MockerFixture):
382
with pytest.raises(Exception) as exc_info:
383
await main()
384
assert "App run error" in str(exc_info.value)
385
+
386
387
+@pytest.mark.asyncio
388
+async def test_edit_contents_handler_missing_patches():
389
+ """Test EditTextFileContents handler with missing patches field."""
390
+ edit_args = {"files": [{"path": "test.txt", "file_hash": "any_hash"}]}
391
392
+ result = await edit_contents_handler.run_tool(edit_args)
393
+ edit_results = json.loads(result[0].text)
394
+ assert edit_results["test.txt"]["result"] == "error"
395
+ assert "Missing required field: patches" in edit_results["test.txt"]["reason"]
0 commit comments