Commit 470519d
committed
test: fix capture_ws TestClient host for loopback guard
Follow-up to f15f6d9 (WS loopback guard on /ws/transcribe). The functional
tests in tests/test_capture_ws.py constructed TestClient with the Starlette
default client=("testclient", 50000), which the guard's _LOOPBACK_HOSTS
allow-list rejects. PR #84 established the fix pattern for HTTP tests:
explicitly pass client=("127.0.0.1", 50000) to TestClient — same security
property, same semantics. Applied here.
3 tests previously failing now pass:
- test_eof_text_frame_triggers_final_without_disconnect
- test_legacy_disconnect_still_finalizes
- test_empty_binary_frame_acts_as_eof1 parent 282c10a commit 470519d
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
0 commit comments