Skip to content

Commit 65c5680

Browse files
author
Andrei
committed
Create test_akamai.py
1 parent 31d2908 commit 65c5680

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

tests/test_akamai.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import pytest
2+
3+
from tests.conftest import BaseTest
4+
from python3_capsolver.akamai import Akamai
5+
6+
7+
class TestAkamaiBase(BaseTest):
8+
AKAMAI_WEB_URL = "https://www.xxxx.com/nMRH2/aYJ/PQ4b/32/0peDlm/b9f5NJcXf7tiYE/OE9CMGI1/Nzsn/bCVKCnA"
9+
10+
def test_captcha_handler_exist(self):
11+
assert "captcha_handler" in Akamai.__dict__.keys()
12+
13+
def test_aio_captcha_handler_exist(self):
14+
assert "aio_captcha_handler" in Akamai.__dict__.keys()
15+
16+
def test_wrong_captcha_type(self):
17+
with pytest.raises(ValueError):
18+
Akamai(
19+
api_key=self.get_random_string(36),
20+
captcha_type="test",
21+
)
22+
23+
def test_no_captcha_type(self):
24+
with pytest.raises(TypeError):
25+
Akamai(api_key=self.get_random_string(36))

0 commit comments

Comments
 (0)