MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / test_send_mints_idempotency_key

Function test_send_mints_idempotency_key

sdks/python/tests/test_v1_client.py:241–248  ·  view source on GitHub ↗
(httpx_mock)

Source from the content-addressed store, hash-verified

239
240@pytest.mark.anyio
241async def test_send_mints_idempotency_key(httpx_mock):
242 httpx_mock.add_response(json={"message_id": "msg_1", "status": "sent"})
243 async with _client() as c:
244 await c.messages.send("bot@test.dev", {"to": ["a@x.com"], "subject": "Hi", "body": "yo"})
245 req = httpx_mock.get_requests()[-1]
246 assert req.method == "POST"
247 assert "/v1/agents/bot%40test.dev/messages" in str(req.url)
248 assert req.headers.get("Idempotency-Key")
249
250
251@pytest.mark.anyio

Callers

nothing calls this directly

Calls 3

_clientFunction · 0.85
sendMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected