soulsync/tests/test_websocket_client_transport.py
Broque Thomas c940363ec2 Fix CI test failures from incomplete dummy config and encoding
8 test files had _DummyConfigManager missing get_active_media_server(),
causing failures when pytest ran them before the test file that had it.
Whichever file set sys.modules first won, and the incomplete dummy broke
later tests. Also fix script.js read_text() missing encoding='utf-8'
which failed on non-UTF-8 default locales.
2026-04-19 13:04:55 -07:00

8 lines
292 B
Python

from pathlib import Path
def test_websocket_client_prefers_polling_before_websocket():
script_path = Path(__file__).resolve().parents[1] / "webui" / "static" / "script.js"
script = script_path.read_text(encoding="utf-8")
assert "transports: ['polling', 'websocket']" in script