aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_helloworld_proves_the_plugin_claim.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-23 22:25:28 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-24 16:45:37 +0200
commit328b01a2dd545d70a078db8df1e91b02d65bfc9c (patch)
tree9af69d617d9482ba4256f3d7334c9dd6cde0d5e2 /packages/meshbay-hub/tests/test_helloworld_proves_the_plugin_claim.py
parent92ea222b7aca6a3eb5f04330f0af6755e6e434e3 (diff)
downloadmeshbay-328b01a2dd545d70a078db8df1e91b02d65bfc9c.tar.gz
test: read the WebRTC transport's source as a set of files
Source-reading tests take their text from node_source (node) and node_tree (hub): webrtc_server.py plus anything under transport/webrtc/, so a check for something's absence keeps reading the code it guards if that code moves. test_node_source_scope holds the boundary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/tests/test_helloworld_proves_the_plugin_claim.py')
-rw-r--r--packages/meshbay-hub/tests/test_helloworld_proves_the_plugin_claim.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/meshbay-hub/tests/test_helloworld_proves_the_plugin_claim.py b/packages/meshbay-hub/tests/test_helloworld_proves_the_plugin_claim.py
index 451b57b..7fc9d8e 100644
--- a/packages/meshbay-hub/tests/test_helloworld_proves_the_plugin_claim.py
+++ b/packages/meshbay-hub/tests/test_helloworld_proves_the_plugin_claim.py
@@ -31,6 +31,7 @@ the code less app-specific rather than more:
import re
from pathlib import Path
+import node_tree
import pytest
STATIC = Path(__file__).resolve().parents[1] / "src" / "meshbay_hub" / "static"
@@ -88,8 +89,7 @@ def test_the_node_names_it_once_and_only_in_the_allow_list():
demonstrate anything. That entry plus the client's registry line is the
whole cost.
"""
- source = (NODE_SRC / "transport" / "webrtc_server.py").read_text(
- encoding="utf-8")
+ source = node_tree.webrtc_source()
code = re.sub(r"^\s*#.*$", "", source, flags=re.M)
hits = [ln for ln in code.splitlines() if "helloworld" in ln.lower()]
assert len(hits) == 1, f"expected one mention, got: {hits}"