Update conftest.py

This commit is contained in:
Andrei 2024-12-15 23:04:10 +03:00
parent e027afe5e2
commit 44d445dddb
1 changed files with 12 additions and 1 deletions

View File

@ -5,6 +5,8 @@ import string
import pytest
from python3_anticaptcha.core.enum import ProxyTypeEnm
@pytest.fixture(scope="function")
def delay_func():
@ -25,8 +27,17 @@ class BaseTest:
proxyAddress = "0.0.0.0"
proxyPort = 9999
def get_proxy_args(self) -> dict:
return {
"proxyType": ProxyTypeEnm.http,
"proxyAddress": "0.0.0.0",
"proxyPort": 445,
"proxyLogin": self.get_random_string(),
"proxyPassword": self.get_random_string(),
}
@staticmethod
def get_random_string(length: int) -> str:
def get_random_string(length: int = 10) -> str:
"""
Method generate random string with set length