From 44d445dddb5fa43d603a688739e9fab6393e581d Mon Sep 17 00:00:00 2001 From: Andrei Date: Sun, 15 Dec 2024 23:04:10 +0300 Subject: [PATCH] Update conftest.py --- tests/conftest.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 866ccce..633c072 100755 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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