Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update test
Browse files Browse the repository at this point in the history
Dacksus committed Jan 22, 2025
1 parent 81918fd commit bc7097c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions python/tests/test_rest.py
Original file line number Diff line number Diff line change
@@ -250,19 +250,15 @@ async def _(_ctx: Context):


@pytest.mark.order(6)
async def test_rest_wrong_client():
@agent.on_rest_get("/get-wrong-client", Response)
async def _(_ctx: Context):
return Response(text="Hi there!")

async def test_inspector_rest_wrong_client():
mock_send = AsyncMock()
with patch("uagents.asgi._read_asgi_body") as mock_receive:
mock_receive.return_value = b""
await agent._server(
scope={
"type": "http",
"method": "GET",
"path": "/get-wrong-client",
"path": "/agent_info",
"client": ("agentverse.ai",),
},
receive=None,

0 comments on commit bc7097c

Please sign in to comment.