Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tests/live/aiograpi_info_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,18 @@ def _build_subprocess_env(

``HIKERAPI_PROXY`` is the proxy the CLI feeds to *every* backend
(``cli._build_backend`` passes ``config.hiker_proxy`` to aiograpi too).
An explicit ``IG_PROXY`` wins over the account's own proxy.
Only an explicit ``IG_PROXY`` is honoured.
"""
env = dict(base_env)
env["INSTO_HOME"] = tmp_home
env["INSTO_BACKEND"] = "aiograpi"
env["AIOGRAPI_USERNAME"] = str(account.get("username") or "")
env["AIOGRAPI_PASSWORD"] = str(account.get("password") or "")
env["AIOGRAPI_TOTP_SEED"] = _account_totp(account)
# Pooled account proxies are unreliable (frequently 302 on CONNECT, which
# surfaces as AuthRequiredProxyError). Only honour an explicit IG_PROXY,
# matching the saved-feed audit's default behaviour.
# Default to no proxy: the seeded session (client_settings) carries the
# account's device trust, so the login does not need one. Honour an
# explicit IG_PROXY when the caller supplies it, matching the saved-feed
# audit's default behaviour.
proxy = base_env.get("IG_PROXY")
if proxy:
env["HIKERAPI_PROXY"] = str(proxy)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_aiograpi_info_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_build_subprocess_env_wires_aiograpi_creds() -> None:


def test_build_subprocess_env_ignores_account_proxy_without_ig_proxy() -> None:
# Pooled account proxies are unreliable (often 302 on CONNECT); only an
# Default is no proxy (the seeded session carries device trust); only an
# explicit IG_PROXY is honoured, matching the saved-feed audit default.
account = {
"username": "u",
Expand Down