MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / post

Method post

tests/test_api_captcha_fingerprint.py:32–57  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

30 return False
31
32 async def post(self, *args, **kwargs):
33 self._calls += 1
34 response = MagicMock()
35 if self._calls == 1:
36 # createTask
37 response.status_code = 200
38 response.json.return_value = {
39 "errorId": 0,
40 "taskId": "tid-xyz",
41 }
42 else:
43 # getTaskResult
44 response.status_code = 200
45 response.json.return_value = {
46 "errorId": 0,
47 "status": "ready",
48 "solution": {
49 "gRecaptchaResponse": "token-abc",
50 "userAgent": (
51 "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
52 "AppleWebKit/537.36 (KHTML, like Gecko) "
53 "Chrome/147.0.0.0 Safari/537.36"
54 ),
55 },
56 }
57 return response
58
59
60class ApiCaptchaFingerprintTests(unittest.IsolatedAsyncioTestCase):

Callers 6

loginMethod · 0.80
_make_requestMethod · 0.80
_make_text_requestMethod · 0.80
test_captcha_scoreFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected