Skip to content

Commit

Permalink
Update test_core.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiDrang committed Oct 5, 2024
1 parent 1c45f81 commit 65aca84
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

from tests.conftest import BaseTest
from python3_anticaptcha.core.base import BaseCaptcha
from python3_anticaptcha.core.enum import MyEnum, CaptchaTypeEnm
from python3_anticaptcha.core.config import RETRIES, ASYNC_RETRIES, BASE_REQUEST_URL, attempts_generator
from python3_anticaptcha.core.enum import MyEnum
from python3_anticaptcha.core.config import RETRIES, ASYNC_RETRIES, attempts_generator


class TestCore(BaseTest):
"""
Success tests
"""

def test_reties(self):
def test_retries(self):
assert isinstance(RETRIES, Retry)

def test_async_reties(self):
Expand All @@ -21,33 +21,25 @@ def test_async_reties(self):
def test_create_base(self):
BaseCaptcha(
api_key=self.get_random_string(32),
captcha_type=CaptchaTypeEnm.Control,
request_url=BASE_REQUEST_URL,
sleep_time=self.sleep_time,
)

def test_aio_create_base(self):
BaseCaptcha(
api_key=self.get_random_string(32),
captcha_type=CaptchaTypeEnm.Control,
request_url=BASE_REQUEST_URL,
sleep_time=self.sleep_time,
)

def test_create_base_context(self):
with BaseCaptcha(
api_key=self.get_random_string(32),
captcha_type=CaptchaTypeEnm.Control,
request_url=BASE_REQUEST_URL,
sleep_time=self.sleep_time,
) as instance:
pass

async def test_aio_create_base_context(self):
async with BaseCaptcha(
api_key=self.get_random_string(32),
captcha_type=CaptchaTypeEnm.Control,
request_url=BASE_REQUEST_URL,
sleep_time=self.sleep_time,
) as instance:
pass
Expand Down

0 comments on commit 65aca84

Please sign in to comment.