From 5deb66c7f66fc7b99ff017920161944f6f65ba7a Mon Sep 17 00:00:00 2001 From: Jason Walker <913443@dadeschools.net> Date: Fri, 24 Jul 2026 17:29:16 -0400 Subject: [PATCH 1/2] fix(webui): migrate Starlette TestClient to httpx2 (#682) Starlette 1.3.x prefers httpx2 for starlette.testclient.TestClient; plain httpx still works but emits StarletteDeprecationWarning. - Pin httpx2==2.9.1 (keep httpx for MCP/runtime) - Centralize Web UI TestClient import via tests/webui_testclient.py - Point all test_webui_* modules at the helper - Add regression tests that the deprecation warning is gone Closes #682 --- requirements.txt | 2 + tests/test_issue_682_starlette_httpx2.py | 66 +++++++++++++++++++++ tests/test_webui_analytics.py | 2 +- tests/test_webui_audit.py | 2 +- tests/test_webui_console_authz_audit.py | 2 +- tests/test_webui_deployment_boundary.py | 2 +- tests/test_webui_gated_actions.py | 2 +- tests/test_webui_inventory.py | 2 +- tests/test_webui_lease_visibility.py | 2 +- tests/test_webui_mvp_suite.py | 2 +- tests/test_webui_project_registry.py | 2 +- tests/test_webui_prompt_library.py | 2 +- tests/test_webui_queue_dashboard.py | 2 +- tests/test_webui_runtime_health.py | 2 +- tests/test_webui_shell.py | 2 +- tests/test_webui_skeleton.py | 2 +- tests/test_webui_system_health.py | 2 +- tests/test_webui_system_health_dashboard.py | 2 +- tests/test_webui_timeline.py | 2 +- tests/test_webui_worktree_hygiene.py | 2 +- tests/webui_testclient.py | 20 +++++++ 21 files changed, 106 insertions(+), 18 deletions(-) create mode 100644 tests/test_issue_682_starlette_httpx2.py create mode 100644 tests/webui_testclient.py diff --git a/requirements.txt b/requirements.txt index f022c56..4f361ec 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,8 @@ cryptography==49.0.0 h11==0.16.0 httpcore==1.0.9 httpx==0.28.1 +# Starlette 1.3.x TestClient prefers httpx2; plain httpx remains for MCP/runtime (#682). +httpx2==2.9.1 httpx-sse==0.4.3 idna==3.18 iniconfig==2.3.0 diff --git a/tests/test_issue_682_starlette_httpx2.py b/tests/test_issue_682_starlette_httpx2.py new file mode 100644 index 0000000..02feb2d --- /dev/null +++ b/tests/test_issue_682_starlette_httpx2.py @@ -0,0 +1,66 @@ +"""Starlette TestClient uses httpx2 without deprecation warning (#682).""" + +from __future__ import annotations + +import importlib +import sys +import unittest +import warnings +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +sys.path.insert(0, str(Path(__file__).resolve().parent)) + + +class TestHttpx2Installed(unittest.TestCase): + def test_httpx2_importable(self) -> None: + httpx2 = importlib.import_module("httpx2") + self.assertTrue(hasattr(httpx2, "Client") or hasattr(httpx2, "AsyncClient")) + + +class TestNoStarletteTestClientDeprecation(unittest.TestCase): + def test_starlette_testclient_import_does_not_warn(self) -> None: + # Force a fresh import path so a previous httpx-fallback warning cannot + # hide a regression after httpx2 is present. + for name in list(sys.modules): + if name == "starlette.testclient" or name.startswith("starlette.testclient."): + del sys.modules[name] + + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + import starlette.testclient as testclient # noqa: F401 + + dep = [ + w + for w in caught + if "httpx" in str(w.message).lower() + and "deprecated" in str(w.message).lower() + ] + self.assertEqual( + dep, + [], + f"expected no Starlette httpx deprecation warning; got: " + f"{[str(w.message) for w in dep]}", + ) + + def test_canonical_webui_testclient_import(self) -> None: + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + from webui_testclient import TestClient + from webui.app import create_app + + client = TestClient(create_app()) + response = client.get("/") + self.assertIn(response.status_code, {200, 302, 404}) + + dep = [ + w + for w in caught + if "httpx" in str(w.message).lower() + and "deprecated" in str(w.message).lower() + ] + self.assertEqual(dep, [], [str(w.message) for w in dep]) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_webui_analytics.py b/tests/test_webui_analytics.py index bf1a419..d7612cb 100644 --- a/tests/test_webui_analytics.py +++ b/tests/test_webui_analytics.py @@ -5,7 +5,7 @@ from __future__ import annotations import os import tempfile import unittest -from starlette.testclient import TestClient +from webui_testclient import TestClient import control_plane_db from webui.analytics_loader import ( diff --git a/tests/test_webui_audit.py b/tests/test_webui_audit.py index 51f8cd9..d636577 100644 --- a/tests/test_webui_audit.py +++ b/tests/test_webui_audit.py @@ -5,7 +5,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient from webui.app import create_app from webui.audit_validator import audit_report, infer_task_kind diff --git a/tests/test_webui_console_authz_audit.py b/tests/test_webui_console_authz_audit.py index 5996f7c..0545be3 100644 --- a/tests/test_webui_console_authz_audit.py +++ b/tests/test_webui_console_authz_audit.py @@ -23,7 +23,7 @@ import sys import tempfile import unittest -from starlette.testclient import TestClient +from webui_testclient import TestClient sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) diff --git a/tests/test_webui_deployment_boundary.py b/tests/test_webui_deployment_boundary.py index 9f5b625..b9b543d 100644 --- a/tests/test_webui_deployment_boundary.py +++ b/tests/test_webui_deployment_boundary.py @@ -7,7 +7,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient from webui.app import create_app from webui.deployment_boundary import ( diff --git a/tests/test_webui_gated_actions.py b/tests/test_webui_gated_actions.py index 87d4086..0630d70 100644 --- a/tests/test_webui_gated_actions.py +++ b/tests/test_webui_gated_actions.py @@ -6,7 +6,7 @@ from unittest.mock import patch sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient from task_capability_map import TASK_CAPABILITY_MAP from webui.app import create_app diff --git a/tests/test_webui_inventory.py b/tests/test_webui_inventory.py index d6bf2d3..3c299ce 100644 --- a/tests/test_webui_inventory.py +++ b/tests/test_webui_inventory.py @@ -15,7 +15,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient import control_plane_db from webui.app import create_app diff --git a/tests/test_webui_lease_visibility.py b/tests/test_webui_lease_visibility.py index a515311..cceb395 100644 --- a/tests/test_webui_lease_visibility.py +++ b/tests/test_webui_lease_visibility.py @@ -5,7 +5,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient from webui.app import create_app from webui.lease_loader import ( diff --git a/tests/test_webui_mvp_suite.py b/tests/test_webui_mvp_suite.py index 2d5bd54..afbb3ab 100644 --- a/tests/test_webui_mvp_suite.py +++ b/tests/test_webui_mvp_suite.py @@ -9,7 +9,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient from starlette.routing import Route from webui.app import create_app diff --git a/tests/test_webui_project_registry.py b/tests/test_webui_project_registry.py index 4d1c650..bde5364 100644 --- a/tests/test_webui_project_registry.py +++ b/tests/test_webui_project_registry.py @@ -7,7 +7,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient from webui.app import create_app from webui.project_registry import ( diff --git a/tests/test_webui_prompt_library.py b/tests/test_webui_prompt_library.py index 3538c2d..f8c5f9c 100644 --- a/tests/test_webui_prompt_library.py +++ b/tests/test_webui_prompt_library.py @@ -6,7 +6,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient from webui.app import create_app from webui.prompt_library import find_prompt, library_to_dict, load_prompt_library, prompt_to_dict diff --git a/tests/test_webui_queue_dashboard.py b/tests/test_webui_queue_dashboard.py index 90ff8e7..c338327 100644 --- a/tests/test_webui_queue_dashboard.py +++ b/tests/test_webui_queue_dashboard.py @@ -7,7 +7,7 @@ from unittest import mock sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient from webui.app import create_app from webui.queue_loader import ( diff --git a/tests/test_webui_runtime_health.py b/tests/test_webui_runtime_health.py index 9fda3ee..410c99b 100644 --- a/tests/test_webui_runtime_health.py +++ b/tests/test_webui_runtime_health.py @@ -6,7 +6,7 @@ from unittest import mock sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient from webui.app import create_app from webui.runtime_health import _role_kind, load_runtime_snapshot, snapshot_to_dict diff --git a/tests/test_webui_shell.py b/tests/test_webui_shell.py index e3c117f..23ac384 100644 --- a/tests/test_webui_shell.py +++ b/tests/test_webui_shell.py @@ -6,7 +6,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) from starlette.routing import Route -from starlette.testclient import TestClient +from webui_testclient import TestClient from webui import layout from webui.app import create_app diff --git a/tests/test_webui_skeleton.py b/tests/test_webui_skeleton.py index 07593d8..6b74daf 100644 --- a/tests/test_webui_skeleton.py +++ b/tests/test_webui_skeleton.py @@ -5,7 +5,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient from webui.app import create_app diff --git a/tests/test_webui_system_health.py b/tests/test_webui_system_health.py index 69cd1dd..c84b341 100644 --- a/tests/test_webui_system_health.py +++ b/tests/test_webui_system_health.py @@ -16,7 +16,7 @@ from unittest import mock sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient import control_plane_db from webui.app import create_app diff --git a/tests/test_webui_system_health_dashboard.py b/tests/test_webui_system_health_dashboard.py index 417e4ae..f96ece5 100644 --- a/tests/test_webui_system_health_dashboard.py +++ b/tests/test_webui_system_health_dashboard.py @@ -11,7 +11,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient from webui.app import create_app from webui.deployment_boundary import scan_text_for_client_secrets diff --git a/tests/test_webui_timeline.py b/tests/test_webui_timeline.py index 39c7ea5..f1f486f 100644 --- a/tests/test_webui_timeline.py +++ b/tests/test_webui_timeline.py @@ -13,7 +13,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient import control_plane_db from canonical_thread_handoff import ( diff --git a/tests/test_webui_worktree_hygiene.py b/tests/test_webui_worktree_hygiene.py index ee62596..6adf107 100644 --- a/tests/test_webui_worktree_hygiene.py +++ b/tests/test_webui_worktree_hygiene.py @@ -7,7 +7,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from starlette.testclient import TestClient +from webui_testclient import TestClient from webui.app import create_app from webui.worktree_scanner import ( diff --git a/tests/webui_testclient.py b/tests/webui_testclient.py new file mode 100644 index 0000000..c12db8e --- /dev/null +++ b/tests/webui_testclient.py @@ -0,0 +1,20 @@ +"""Canonical Web UI ``TestClient`` import for the Gitea-Tools suite (#682). + +Starlette 1.3+ builds ``starlette.testclient.TestClient`` on ``httpx2``. +Plain ``httpx`` still works but emits ``StarletteDeprecationWarning``. + +All Web UI tests import ``TestClient`` from this module so: + +* dependency intent is single-sourced (``httpx2`` in ``requirements.txt``); +* a future client-construction helper has one place to land; +* import-site audits do not need to re-scan every ``test_webui_*.py``. + +Runtime MCP / FastMCP code continues to use ``httpx``; this module is +test-only and does not change production clients. +""" + +from __future__ import annotations + +from starlette.testclient import TestClient + +__all__ = ["TestClient"] From c74b8da40057349e6eabb12040bda4abe442a826 Mon Sep 17 00:00:00 2001 From: Jason Walker <913443@dadeschools.net> Date: Fri, 24 Jul 2026 18:18:10 -0400 Subject: [PATCH 2/2] fix(webui): package-qualify webui_testclient import across test suite (Closes #682) --- tests/test_issue_682_starlette_httpx2.py | 46 ++++++++++++--------- tests/test_webui_analytics.py | 2 +- tests/test_webui_audit.py | 2 +- tests/test_webui_console_authz_audit.py | 2 +- tests/test_webui_deployment_boundary.py | 2 +- tests/test_webui_gated_actions.py | 2 +- tests/test_webui_inventory.py | 2 +- tests/test_webui_lease_visibility.py | 2 +- tests/test_webui_mvp_suite.py | 2 +- tests/test_webui_project_registry.py | 2 +- tests/test_webui_prompt_library.py | 2 +- tests/test_webui_queue_dashboard.py | 2 +- tests/test_webui_runtime_health.py | 2 +- tests/test_webui_shell.py | 2 +- tests/test_webui_skeleton.py | 2 +- tests/test_webui_system_health.py | 2 +- tests/test_webui_system_health_dashboard.py | 2 +- tests/test_webui_timeline.py | 2 +- tests/test_webui_worktree_hygiene.py | 2 +- 19 files changed, 44 insertions(+), 38 deletions(-) diff --git a/tests/test_issue_682_starlette_httpx2.py b/tests/test_issue_682_starlette_httpx2.py index 02feb2d..ff49c8e 100644 --- a/tests/test_issue_682_starlette_httpx2.py +++ b/tests/test_issue_682_starlette_httpx2.py @@ -9,7 +9,6 @@ import warnings from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -sys.path.insert(0, str(Path(__file__).resolve().parent)) class TestHttpx2Installed(unittest.TestCase): @@ -21,32 +20,39 @@ class TestHttpx2Installed(unittest.TestCase): class TestNoStarletteTestClientDeprecation(unittest.TestCase): def test_starlette_testclient_import_does_not_warn(self) -> None: # Force a fresh import path so a previous httpx-fallback warning cannot - # hide a regression after httpx2 is present. - for name in list(sys.modules): - if name == "starlette.testclient" or name.startswith("starlette.testclient."): + # hide a regression after httpx2 is present. Restore sys.modules afterwards. + saved = { + name: sys.modules[name] + for name in list(sys.modules) + if name == "starlette.testclient" or name.startswith("starlette.testclient.") + } + try: + for name in list(saved): del sys.modules[name] - with warnings.catch_warnings(record=True) as caught: - warnings.simplefilter("always") - import starlette.testclient as testclient # noqa: F401 + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + import starlette.testclient as testclient # noqa: F401 - dep = [ - w - for w in caught - if "httpx" in str(w.message).lower() - and "deprecated" in str(w.message).lower() - ] - self.assertEqual( - dep, - [], - f"expected no Starlette httpx deprecation warning; got: " - f"{[str(w.message) for w in dep]}", - ) + dep = [ + w + for w in caught + if "httpx" in str(w.message).lower() + and "deprecated" in str(w.message).lower() + ] + self.assertEqual( + dep, + [], + f"expected no Starlette httpx deprecation warning; got: " + f"{[str(w.message) for w in dep]}", + ) + finally: + sys.modules.update(saved) def test_canonical_webui_testclient_import(self) -> None: with warnings.catch_warnings(record=True) as caught: warnings.simplefilter("always") - from webui_testclient import TestClient + from tests.webui_testclient import TestClient from webui.app import create_app client = TestClient(create_app()) diff --git a/tests/test_webui_analytics.py b/tests/test_webui_analytics.py index d7612cb..560c2d9 100644 --- a/tests/test_webui_analytics.py +++ b/tests/test_webui_analytics.py @@ -5,7 +5,7 @@ from __future__ import annotations import os import tempfile import unittest -from webui_testclient import TestClient +from tests.webui_testclient import TestClient import control_plane_db from webui.analytics_loader import ( diff --git a/tests/test_webui_audit.py b/tests/test_webui_audit.py index d636577..f6e33ad 100644 --- a/tests/test_webui_audit.py +++ b/tests/test_webui_audit.py @@ -5,7 +5,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient from webui.app import create_app from webui.audit_validator import audit_report, infer_task_kind diff --git a/tests/test_webui_console_authz_audit.py b/tests/test_webui_console_authz_audit.py index 0545be3..79a361f 100644 --- a/tests/test_webui_console_authz_audit.py +++ b/tests/test_webui_console_authz_audit.py @@ -23,7 +23,7 @@ import sys import tempfile import unittest -from webui_testclient import TestClient +from tests.webui_testclient import TestClient sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) diff --git a/tests/test_webui_deployment_boundary.py b/tests/test_webui_deployment_boundary.py index b9b543d..d29ee26 100644 --- a/tests/test_webui_deployment_boundary.py +++ b/tests/test_webui_deployment_boundary.py @@ -7,7 +7,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient from webui.app import create_app from webui.deployment_boundary import ( diff --git a/tests/test_webui_gated_actions.py b/tests/test_webui_gated_actions.py index 0630d70..1aa3e2b 100644 --- a/tests/test_webui_gated_actions.py +++ b/tests/test_webui_gated_actions.py @@ -6,7 +6,7 @@ from unittest.mock import patch sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient from task_capability_map import TASK_CAPABILITY_MAP from webui.app import create_app diff --git a/tests/test_webui_inventory.py b/tests/test_webui_inventory.py index 3c299ce..fbca984 100644 --- a/tests/test_webui_inventory.py +++ b/tests/test_webui_inventory.py @@ -15,7 +15,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient import control_plane_db from webui.app import create_app diff --git a/tests/test_webui_lease_visibility.py b/tests/test_webui_lease_visibility.py index cceb395..ccb6da4 100644 --- a/tests/test_webui_lease_visibility.py +++ b/tests/test_webui_lease_visibility.py @@ -5,7 +5,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient from webui.app import create_app from webui.lease_loader import ( diff --git a/tests/test_webui_mvp_suite.py b/tests/test_webui_mvp_suite.py index afbb3ab..0847eb9 100644 --- a/tests/test_webui_mvp_suite.py +++ b/tests/test_webui_mvp_suite.py @@ -9,7 +9,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient from starlette.routing import Route from webui.app import create_app diff --git a/tests/test_webui_project_registry.py b/tests/test_webui_project_registry.py index bde5364..244a6e2 100644 --- a/tests/test_webui_project_registry.py +++ b/tests/test_webui_project_registry.py @@ -7,7 +7,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient from webui.app import create_app from webui.project_registry import ( diff --git a/tests/test_webui_prompt_library.py b/tests/test_webui_prompt_library.py index f8c5f9c..c354273 100644 --- a/tests/test_webui_prompt_library.py +++ b/tests/test_webui_prompt_library.py @@ -6,7 +6,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient from webui.app import create_app from webui.prompt_library import find_prompt, library_to_dict, load_prompt_library, prompt_to_dict diff --git a/tests/test_webui_queue_dashboard.py b/tests/test_webui_queue_dashboard.py index c338327..8c0c31a 100644 --- a/tests/test_webui_queue_dashboard.py +++ b/tests/test_webui_queue_dashboard.py @@ -7,7 +7,7 @@ from unittest import mock sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient from webui.app import create_app from webui.queue_loader import ( diff --git a/tests/test_webui_runtime_health.py b/tests/test_webui_runtime_health.py index 410c99b..c775ae8 100644 --- a/tests/test_webui_runtime_health.py +++ b/tests/test_webui_runtime_health.py @@ -6,7 +6,7 @@ from unittest import mock sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient from webui.app import create_app from webui.runtime_health import _role_kind, load_runtime_snapshot, snapshot_to_dict diff --git a/tests/test_webui_shell.py b/tests/test_webui_shell.py index 23ac384..57829c7 100644 --- a/tests/test_webui_shell.py +++ b/tests/test_webui_shell.py @@ -6,7 +6,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) from starlette.routing import Route -from webui_testclient import TestClient +from tests.webui_testclient import TestClient from webui import layout from webui.app import create_app diff --git a/tests/test_webui_skeleton.py b/tests/test_webui_skeleton.py index 6b74daf..de8275a 100644 --- a/tests/test_webui_skeleton.py +++ b/tests/test_webui_skeleton.py @@ -5,7 +5,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient from webui.app import create_app diff --git a/tests/test_webui_system_health.py b/tests/test_webui_system_health.py index c84b341..151e715 100644 --- a/tests/test_webui_system_health.py +++ b/tests/test_webui_system_health.py @@ -16,7 +16,7 @@ from unittest import mock sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient import control_plane_db from webui.app import create_app diff --git a/tests/test_webui_system_health_dashboard.py b/tests/test_webui_system_health_dashboard.py index f96ece5..fad5baa 100644 --- a/tests/test_webui_system_health_dashboard.py +++ b/tests/test_webui_system_health_dashboard.py @@ -11,7 +11,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient from webui.app import create_app from webui.deployment_boundary import scan_text_for_client_secrets diff --git a/tests/test_webui_timeline.py b/tests/test_webui_timeline.py index f1f486f..d5fcfb0 100644 --- a/tests/test_webui_timeline.py +++ b/tests/test_webui_timeline.py @@ -13,7 +13,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient import control_plane_db from canonical_thread_handoff import ( diff --git a/tests/test_webui_worktree_hygiene.py b/tests/test_webui_worktree_hygiene.py index 6adf107..519e010 100644 --- a/tests/test_webui_worktree_hygiene.py +++ b/tests/test_webui_worktree_hygiene.py @@ -7,7 +7,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from webui_testclient import TestClient +from tests.webui_testclient import TestClient from webui.app import create_app from webui.worktree_scanner import (