From ef942b93d1e9bfc28bf607dfaf501cc7d9685e7b Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Thu, 24 Sep 2026 17:42:10 +0200 Subject: test(node): read the daemon's source wherever it is split Tests that read daemon.py now take their text from node_source (daemon.py, NodeDaemon's bases, the cli package once it exists). The CLI tests that sliced main() run the CLI instead. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-node/tests/test_stream_capacity_config.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'packages/meshbay-node/tests/test_stream_capacity_config.py') diff --git a/packages/meshbay-node/tests/test_stream_capacity_config.py b/packages/meshbay-node/tests/test_stream_capacity_config.py index 5514712..a40cbc0 100644 --- a/packages/meshbay-node/tests/test_stream_capacity_config.py +++ b/packages/meshbay-node/tests/test_stream_capacity_config.py @@ -27,6 +27,7 @@ from meshbay_node.config import load_config from meshbay_node.roots import RootSet from meshbay_node.transport.webrtc.apps.streaming import MAX_CONCURRENT_TRANSCODES from meshbay_node.transport.webrtc_server import WebRTCPeerSession, WebRTCTransport +from node_source import daemon_call def _cfg(tmp_path: Path, body: str): @@ -133,10 +134,7 @@ def test_the_daemon_passes_it( ): `self.cfg` parses and imports perfectly well; it raises AttributeError the first time somebody plays a video, which is not where anyone would look. """ - daemon = (Path(__file__).resolve().parents[1] / "src" / "meshbay_node" - / "daemon.py").read_text(encoding="utf-8") - i = daemon.index("WebRTCTransport(") - call = daemon[i:daemon.index(")", daemon.index("denylist=denylist", i))] + call = daemon_call("WebRTCTransport") assert "max_concurrent_streams=" in call, ( "the daemon builds the transport without the operator's setting, so " "node.toml is read and then ignored") -- cgit v1.2.3