aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_search_connect_deadline.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/tests/test_search_connect_deadline.py')
-rw-r--r--packages/meshbay-hub/tests/test_search_connect_deadline.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/meshbay-hub/tests/test_search_connect_deadline.py b/packages/meshbay-hub/tests/test_search_connect_deadline.py
index d41cbb5..2d3db06 100644
--- a/packages/meshbay-hub/tests/test_search_connect_deadline.py
+++ b/packages/meshbay-hub/tests/test_search_connect_deadline.py
@@ -32,6 +32,7 @@ import subprocess
from pathlib import Path
import pytest
+from spa_source import search_argv, search_source
STATIC = Path(__file__).resolve().parents[1] / "src" / "meshbay_hub" / "static"
SEARCH_PAGE = STATIC / "search-page.js"
@@ -47,7 +48,7 @@ CAP_MS = 30000
def _attempt(**cfg) -> dict:
proc = subprocess.run(
- ["node", str(HARNESS), str(SEARCH_PAGE), json.dumps(cfg)],
+ ["node", str(HARNESS), search_argv(), json.dumps(cfg)],
capture_output=True, text=True)
assert proc.returncode == 0, proc.stderr
return json.loads(proc.stdout)
@@ -59,7 +60,7 @@ def test_the_constants_are_what_these_scenarios_assume():
a change to either without a change here would leave the scenarios asserting
about a deadline the code no longer has.
"""
- code = SEARCH_PAGE.read_text(encoding="utf-8")
+ code = search_source()
assert f"const SEARCH_STALL_MS = {STALL_MS};" in code
assert f"const SEARCH_MAX_MS = {CAP_MS};" in code