IS
@dataclass
class Url:
my_url : str= bla
by_second_url: str = blabla
conftest.py
def config(env):
if env == 'bla':
yield Url()
def test_something(config):
ya_tebe_shas_suka = rasskaju(pro=dataclassy, url=config.my_second_url)
Size: a a a
IS
@dataclass
class Url:
my_url : str= bla
by_second_url: str = blabla
conftest.py
def config(env):
if env == 'bla':
yield Url()
def test_something(config):
ya_tebe_shas_suka = rasskaju(pro=dataclassy, url=config.my_second_url)
BK
T
@dataclass
class Url:
my_url : str= bla
by_second_url: str = blabla
conftest.py
def config(env):
if env == 'bla':
yield Url()
def test_something(config):
ya_tebe_shas_suka = rasskaju(pro=dataclassy, url=config.my_second_url)
BK
IS
SV
@dataclass
class Url:
my_url : str= bla
by_second_url: str = blabla
conftest.py
def config(env):
if env == 'bla':
yield Url()
def test_something(config):
ya_tebe_shas_suka = rasskaju(pro=dataclassy, url=config.my_second_url)
BK
@pytest.fixture
def sign_in_as_super_admin(set_config):
from pages.amd_dashboard.sign_in import LoginPage as AmdUser
url = {'beta': ADM_URL, 'alpha': AMD_URL_ALPHA}
navigate_to(url[set_config.env])
AmdUser().login_action(login=AMD_USER, password=AMD_PASSWORD)@dataclass
class Url:
# Beta
AMD_URL: str = AMD_URL
# Alpha
AMD_URL_ALPHA: str = AMD_URL_ALPHA
@pytest.fixture
def config(set_config):
if set_config.env == 'alpha':
yield Url()
if set_config.env == 'beta':
yield Url()
@pytest.fixture
def sign_in_as_super_admin(config):
from pages.amd_dashboard.sign_in import LoginPage as AmdUser
# url = {'beta': Urls.AMD_URL, 'alpha': Urls.AMD_URL_ALPHA}
navigate_to(config.AMD_URL)
AmdUser().login_action(login=AMD_USER, password=AMD_PASSWORD)
IS
@dataclass
class Url:
# Beta
AMD_URL: str = AMD_URL
# Alpha
AMD_URL_ALPHA: str = AMD_URL_ALPHA
@pytest.fixture
def config(set_config):
if set_config.env == 'alpha':
yield Url()
if set_config.env == 'beta':
yield Url()
@pytest.fixture
def sign_in_as_super_admin(config):
from pages.amd_dashboard.sign_in import LoginPage as AmdUser
# url = {'beta': Urls.AMD_URL, 'alpha': Urls.AMD_URL_ALPHA}
navigate_to(config.AMD_URL)
AmdUser().login_action(login=AMD_USER, password=AMD_PASSWORD)
AMD_URL_ALPHA. Я чуть неправильно написал)BK
AMD_URL_ALPHA. Я чуть неправильно написал)@dataclass
class Url:
# Beta
AMD_URL: str = AMD_URL
# Alpha
AMD_URL_ALPHA: str = AMD_URL_ALPHA
@pytest.fixture
def config(set_config):
if set_config.env == 'alpha':
yield Url.AMD_URL_ALPHA
if set_config.env == 'beta':
yield Url.AMD_URL
@pytest.fixture
def sign_in_as_super_admin(config):
from pages.amd_dashboard.sign_in import LoginPage as AmdUser
navigate_to(config)
AmdUser().login_action(login=AMD_USER, password=AMD_PASSWORD)
IS
BK
BK
BK
@dataclass
class Url:
# Beta
AMD_URL: str = AMD_URL
REMASTERED_URL: str = REMASTERED_URL
CUSTOMER_DASHBOARD_URL: str = CUSTOMER_DASHBOARD_URL
PM_URL: str = PM_URL
# Alpha
AMD_URL_ALPHA: str = AMD_URL_ALPHA
@pytest.fixture
def config(set_config):
if set_config.env == 'alpha':
yield Url.AMD_URL_ALPHA
if set_config.env == 'beta':
yield Url.AMD_URL, Url.REMASTERED_URL, Url.CUSTOMER_DASHBOARD_URL, Url.PM_URL
BK
BK
IS
@dataclass
class Url:
AMD_URL: str = AMD_URL
REMASTERED_URL: str = REMASTERED_URL
CUSTOMER_DASHBOARD_URL: str = CUSTOMER_DASHBOARD_URL
PM_URL: str = PM_URL
class Base:
def __init__(self, url: str=None):
self.base_url = url
@classmethod
def alfa(cls):
return cls('alfa')
@classmethod
def beta(cls):
return cls('beta')
class UrlContainer:
def __init__(self, url_storage: Url, builder: Base):
for a, b in url_storage.__dict__.items():
setattr(self, a, '/'.join([builder.base_url, b]))
storage = Url()
all_paths = UrlContainer(storage, Base.alfa())
@pytest.fixture
def config(set_config):
if set_config.env == 'alpha':
yield Base.alfa()
if set_config.env == 'beta':
yield Base.beta()BK
@dataclass
class Url:
AMD_URL: str = AMD_URL
REMASTERED_URL: str = REMASTERED_URL
CUSTOMER_DASHBOARD_URL: str = CUSTOMER_DASHBOARD_URL
PM_URL: str = PM_URL
class Base:
def __init__(self, url: str=None):
self.base_url = url
@classmethod
def alfa(cls):
return cls('alfa')
@classmethod
def beta(cls):
return cls('beta')
class UrlContainer:
def __init__(self, url_storage: Url, builder: Base):
for a, b in url_storage.__dict__.items():
setattr(self, a, '/'.join([builder.base_url, b]))
storage = Url()
all_paths = UrlContainer(storage, Base.alfa())
@pytest.fixture
def config(set_config):
if set_config.env == 'alpha':
yield Base.alfa()
if set_config.env == 'beta':
yield Base.beta()BK
IS
BK