session token fix for captcha

This commit is contained in:
2026-10-09 12:39:32 +05:30
parent 385a9e22cc
commit d9218709f0
8 changed files with 76 additions and 23 deletions
+7 -1
View File
@@ -339,7 +339,13 @@ def create_and_activate_token(driver, step, token):
@pytest.mark.trading_token
@pytest.mark.parametrize("config", get_setup_configs("token"), ids=lambda c: c["product_name"])
def test_trading_token_creation(driver, test_context, config):
def test_trading_token_creation(driver, test_context, config, request):
# The full setup command runs token-enabled products through the combined
# flow so session and token creation use one browser/login context.
invocation = " ".join(str(arg).replace("\\", "/") for arg in request.config.invocation_params.args)
if "tests/setup" in invocation and "tests/setup/tokens" not in invocation and "test_trading_token.py" not in invocation:
pytest.skip("Handled by the shared full setup flow")
config, step, token = get_token_context(driver, test_context, config)
open_app_and_login(driver, step, config)