feat: reuse single comment

This commit is contained in:
2026-07-21 00:54:46 +02:00
parent a9289e656c
commit 73045258fa
9 changed files with 170 additions and 56 deletions
+22
View File
@@ -0,0 +1,22 @@
import json
import httpx
import respx
from agentci.adapters.gitea import GiteaClient
@respx.mock
async def test_updates_issue_comment_by_id() -> None:
route = respx.patch(
"https://gitea.example/api/v1/repos/org/repo/issues/comments/17"
).mock(return_value=httpx.Response(200, json={"id": 17}))
client = GiteaClient("https://gitea.example", "secret")
try:
await client.update_comment("org", "repo", 17, "updated status")
finally:
await client.close()
assert route.called
assert json.loads(route.calls[0].request.content) == {"body": "updated status"}