MCPcopy Create free account
hub / github.com/alperensert/capmonster_python / test_create_task_async

Function test_create_task_async

tests/client_mock_test.py:47–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45@respx.mock
46@pytest.mark.asyncio
47async def test_create_task_async():
48 respx.post(f"{BASE_URL}/createTask").mock(
49 return_value=Response(200, json={"errorId": 0, "taskId": 789})
50 )
51 client = CapmonsterClient("test_key")
52 task = RecaptchaV2Task(websiteURL="https://example.com", websiteKey="key123")
53 task_id = await client.create_task_async(task)
54 assert task_id == 789
55
56
57@respx.mock

Callers

nothing calls this directly

Calls 3

create_task_asyncMethod · 0.95
CapmonsterClientClass · 0.90
RecaptchaV2TaskClass · 0.90

Tested by

no test coverage detected