Commit 4089f3f
committed
Fix test_useragent_header leaking agent env vars
Clear all KNOWN_AGENTS env vars in test_useragent_header before
connecting, mirroring the pattern in test_agent_detection.py. Without
this, running the test inside an AI-agent shell (e.g. Claude Code, which
sets CLAUDECODE=1) causes session.py to append " agent/<product>" to
the User-Agent and the strict `in` assertion fails. CI runners don't
set agent env vars so this passes there, but the test is environment-
sensitive locally.
Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>1 parent cbd6a88 commit 4089f3f
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| |||
0 commit comments