chore: remove unused dead code
This commit is contained in:
@@ -131,7 +131,6 @@ async def test_connect_mcp_retries_when_no_servers_connect(tmp_path, monkeypatch
|
||||
await loop._connect_mcp()
|
||||
|
||||
assert attempts == 2
|
||||
assert loop._mcp_connected is False
|
||||
assert loop._mcp_stacks == {}
|
||||
|
||||
|
||||
|
||||
@@ -43,9 +43,6 @@ from nanobot.webui.http_utils import (
|
||||
from nanobot.webui.http_utils import (
|
||||
normalize_config_path as _normalize_config_path,
|
||||
)
|
||||
from nanobot.webui.http_utils import (
|
||||
normalize_http_path as _normalize_http_path,
|
||||
)
|
||||
from nanobot.webui.http_utils import (
|
||||
parse_query as _parse_query,
|
||||
)
|
||||
@@ -227,15 +224,15 @@ def _sent_ws_payloads(mock_ws: AsyncMock) -> list[dict[str, Any]]:
|
||||
return [json.loads(call.args[0]) for call in mock_ws.send.await_args_list]
|
||||
|
||||
|
||||
def test_normalize_http_path_strips_trailing_slash_except_root() -> None:
|
||||
assert _normalize_http_path("/chat/") == "/chat"
|
||||
assert _normalize_http_path("/chat?x=1") == "/chat"
|
||||
assert _normalize_http_path("/") == "/"
|
||||
def test_parse_request_path_strips_trailing_slash_except_root() -> None:
|
||||
assert _parse_request_path("/chat/")[0] == "/chat"
|
||||
assert _parse_request_path("/chat?x=1")[0] == "/chat"
|
||||
assert _parse_request_path("/")[0] == "/"
|
||||
|
||||
|
||||
def test_parse_request_path_matches_normalize_and_query() -> None:
|
||||
def test_parse_request_path_matches_query() -> None:
|
||||
path, query = _parse_request_path("/ws/?token=secret&client_id=u1")
|
||||
assert path == _normalize_http_path("/ws/?token=secret&client_id=u1")
|
||||
assert path == "/ws"
|
||||
assert query == _parse_query("/ws/?token=secret&client_id=u1")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user