Don't resize terminal on session disconnect
Rename DISCONNECT_RESIZE to DEFAULT_TERMINAL_SIZE Update tests for removed _resize_on_disconnect and stricter available check Bump version to 0.2.7
This commit is contained in:
@@ -167,17 +167,6 @@ class TestLocalServerHelpers:
|
||||
assert session_created is True
|
||||
ws.send_json.assert_awaited_once_with(["error", "No app configured"])
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_resize_on_disconnect_calls_set_terminal_size(self, server, monkeypatch):
|
||||
session = MagicMock()
|
||||
session.set_terminal_size = AsyncMock()
|
||||
|
||||
monkeypatch.setattr(server.session_manager, "get_session_by_route_key", lambda _rk: session)
|
||||
|
||||
await server._resize_on_disconnect("rk")
|
||||
|
||||
session.set_terminal_size.assert_called_once_with(132, 45)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_create_terminal_session_sends_error_if_no_apps(self, server):
|
||||
ws = MagicMock()
|
||||
|
||||
Reference in New Issue
Block a user