diff --git a/pyproject.toml b/pyproject.toml index 3af99c5..8f105f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,10 +15,7 @@ aiohttp = "^3.13.0" uvloop = { version = "^0.22.0", markers = "sys_platform != 'win32'" } click = "^8.1.7" pydantic = "^2.7.0" -xdg = "^6.0.0" -msgpack = "^1.1.0" importlib-metadata = ">=6.0.0" -httpx = ">=0.27.0" tomli = { version = "^2.0.1", python = "<3.11" } pyyaml = "^6.0.0" pyte = "^0.8.0" diff --git a/src/textual_webterm/app_session.py b/src/textual_webterm/app_session.py index cf7f263..1a05466 100644 --- a/src/textual_webterm/app_session.py +++ b/src/textual_webterm/app_session.py @@ -140,8 +140,8 @@ class AppSession(Session): environment["TEXTUAL_DRIVER"] = "textual.drivers.web_driver:WebDriver" environment["TEXTUAL_FPS"] = "60" environment["TEXTUAL_COLOR_SYSTEM"] = "truecolor" - environment["TERM_PROGRAM"] = "textual-web" - environment["TERM_PROGRAM_VERSION"] = version("textual-web") + environment["TERM_PROGRAM"] = "textual-webterm" + environment["TERM_PROGRAM_VERSION"] = version("textual-webterm") environment["COLUMNS"] = str(width) environment["ROWS"] = str(height) if self.devtools: diff --git a/tests/test_cli.py b/tests/test_cli.py index 8782d73..f5ed552 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -157,7 +157,7 @@ class TestCLI: runner = CliRunner() result = runner.invoke(cli_app, ["--version"]) assert result.exit_code == 0 - assert "0.1.0" in result.output + assert "version" in result.output def test_cli_invalid_app_path(self): """Test CLI with invalid app path.""" diff --git a/tests/test_local_server_unit.py b/tests/test_local_server_unit.py index 9380f47..ea1378e 100644 --- a/tests/test_local_server_unit.py +++ b/tests/test_local_server_unit.py @@ -687,17 +687,15 @@ class TestLocalServerMoreCoverage: assert created["called"] is True def test_build_routes_logs_error_when_static_path_missing(self, server_with_no_apps, monkeypatch): - from pathlib import Path + from unittest.mock import MagicMock from textual_webterm import local_server - class FakePath(Path): - _flavour = type(Path())._flavour + # Create a mock path that returns False for exists() + fake_path = MagicMock() + fake_path.exists.return_value = False - def exists(self) -> bool: # type: ignore[override] - return False - - monkeypatch.setattr(local_server, "STATIC_PATH", FakePath("/definitely-missing")) + monkeypatch.setattr(local_server, "STATIC_PATH", fake_path) monkeypatch.setattr(local_server.log, "error", MagicMock()) server_with_no_apps._build_routes()