diff options
Diffstat (limited to 'packages/meshbay-hub/tests/test_app_settings_plugin.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_app_settings_plugin.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/meshbay-hub/tests/test_app_settings_plugin.py b/packages/meshbay-hub/tests/test_app_settings_plugin.py index a1ecec7..a56d70f 100644 --- a/packages/meshbay-hub/tests/test_app_settings_plugin.py +++ b/packages/meshbay-hub/tests/test_app_settings_plugin.py @@ -17,6 +17,7 @@ from pathlib import Path import node_tree import pytest +from spa_source import transport_source STATIC = Path(__file__).resolve().parents[1] / "src" / "meshbay_hub" / "static" APPS = STATIC / "apps.js" @@ -195,7 +196,7 @@ def test_the_directory_op_is_signed_and_names_its_app(): indistinguishable — so the app is in the signed subject, and both sides build it the same way. """ - transport = TRANSPORT.read_text(encoding="utf-8") + transport = transport_source() body = transport[transport.index("async setAppDirectories("):] body = body[:body.index("\n async ", 1)] assert "admin_challenge" in body and "_authorizeAdminOp" in body @@ -378,7 +379,7 @@ def test_a_saved_setting_reaches_the_page_that_renders_the_pane(): the broadcast, and the one that asked went on showing an unsaved-looking draft. Clicking Save again just re-sent it. """ - transport = TRANSPORT.read_text(encoding="utf-8") + transport = transport_source() block = transport[transport.index("const BROADCAST_ACK_TYPES"):] block = block[:block.index("]);") + 3] for ack in ("chat_directory_ack", "chat_link_preview_ack", |