-
Notifications
You must be signed in to change notification settings - Fork 132
Expand file tree
/
Copy pathtest_async_altcha.py
More file actions
30 lines (22 loc) · 946 Bytes
/
test_async_altcha.py
File metadata and controls
30 lines (22 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python3
import unittest
try:
from .abstract_async import AsyncAbstractTest
except ImportError:
from abstract_async import AsyncAbstractTest
class AsyncAltchaTest(AsyncAbstractTest):
def test_all_params(self):
params = {
'pageurl': 'https://mysite.com/page/with/altcha',
'challenge_json': '{"algorithm":"SHA-256","challenge":"a4c9d8e7f1b23a6c...",..."signature":"7b3e2a9d5c8f1046e2d91c3a..."}',
'challenge_url': 'https://example/altcha'
}
sends = {
'method': 'altcha',
'pageurl': 'https://mysite.com/page/with/altcha',
'challenge_json': '{"algorithm":"SHA-256","challenge":"a4c9d8e7f1b23a6c...",..."signature":"7b3e2a9d5c8f1046e2d91c3a..."}',
'challenge_url': 'https://example/altcha'
}
self.send_return(sends, self.solver.altcha, **params)
if __name__ == '__main__':
unittest.main()