summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests/test_app_directories.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-node/tests/test_app_directories.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-node/tests/test_app_directories.py')
-rw-r--r--packages/meshbay-node/tests/test_app_directories.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/packages/meshbay-node/tests/test_app_directories.py b/packages/meshbay-node/tests/test_app_directories.py
index 955a769..1b8d1e0 100644
--- a/packages/meshbay-node/tests/test_app_directories.py
+++ b/packages/meshbay-node/tests/test_app_directories.py
@@ -32,6 +32,7 @@ from meshbay_node.indexer.group_index import GroupIndex
from meshbay_node.roots import RootSet
from meshbay_node.roster import Roster
from meshbay_node.transport.webrtc_server import WebRTCPeerSession
+from node_source import session_method
from conftest import one_root
@@ -423,11 +424,7 @@ async def test_the_ack_has_no_list_of_applications_of_its_own():
"""
from meshbay_node.daemon import NodeDaemon
- source = Path(WebRTCPeerSession.__module__.replace(".", "/"))
- text = (Path(__file__).resolve().parents[2] / "meshbay-node" / "src"
- / f"{source}.py").read_text(encoding="utf-8")
- body = text[text.index("def _app_directories_ack"):]
- body = body[:body.index("\n def ", 1)]
+ body = session_method("_app_directories_ack")
for app in NodeDaemon.APP_DIR_KEYS:
assert app not in body, (
f"the ack names {app!r}; it must read the context's own keys")