diff options
Diffstat (limited to 'packages/meshbay-hub/tests/test_challenge_signature_client.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_challenge_signature_client.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/meshbay-hub/tests/test_challenge_signature_client.py b/packages/meshbay-hub/tests/test_challenge_signature_client.py index e3c33ac..c13c55d 100644 --- a/packages/meshbay-hub/tests/test_challenge_signature_client.py +++ b/packages/meshbay-hub/tests/test_challenge_signature_client.py @@ -85,7 +85,7 @@ def test_the_browser_holds_the_node_to_its_challenge(tmp_path): cases = { "signed over this connection": (case(), "true"), - "an older node, no signature": (case(sig=None), "false"), + "no signature": (case(sig=None), "refused"), "another key announced": (case(pk=sk_other), "refused"), "a relay's fingerprint": (case(answer=os.urandom(32)), "refused"), "a replay under another nonce": (case(nonce=os.urandom(32)), "refused"), @@ -93,11 +93,11 @@ def test_the_browser_holds_the_node_to_its_challenge(tmp_path): "garbage for a signature": (case(sig=b"\x00" * 64), "refused"), } harness = tmp_path / "harness.js" - harness.write_text(_HARNESS) + harness.write_text(_HARNESS, encoding="utf-8") payload = tmp_path / "cases.json" - payload.write_text(json.dumps([c for c, _ in cases.values()])) + payload.write_text(json.dumps([c for c, _ in cases.values()]), encoding="utf-8") proc = subprocess.run(["node", str(harness), str(STATIC), str(payload), transport_argv()], - capture_output=True, text=True, timeout=60) + capture_output=True, text=True, encoding="utf-8", timeout=60) assert proc.returncode == 0, proc.stderr got = dict(zip(cases, json.loads(proc.stdout))) assert got == {name: want for name, (_, want) in cases.items()} |