Files
2026-07-13 13:12:33 +08:00

15 lines
515 B
Python

from __future__ import annotations
from opensquilla.cli.url_utils import normalize_gateway_url
def test_normalize_gateway_url_preserves_query_and_fragment() -> None:
assert (
normalize_gateway_url("https://gateway.example.com/ws?token=abc#trace")
== "wss://gateway.example.com/ws?token=abc#trace"
)
def test_normalize_gateway_url_adds_ws_path_without_dropping_query() -> None:
assert normalize_gateway_url("gateway.example.com?token=abc") == "ws://gateway.example.com/ws?token=abc"