aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-common/tests
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-common/tests')
-rw-r--r--packages/meshbay-common/tests/test_js_python_parity.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/packages/meshbay-common/tests/test_js_python_parity.py b/packages/meshbay-common/tests/test_js_python_parity.py
index 6f7437f..1abae75 100644
--- a/packages/meshbay-common/tests/test_js_python_parity.py
+++ b/packages/meshbay-common/tests/test_js_python_parity.py
@@ -258,6 +258,11 @@ GROUPBOX_VECTORS = [
("index", "index_sync", "groupe-café-日本"),
# A '|' inside the group id, which is the AAD's own separator.
("index", "index_sync", "a|b"),
+ # MNP 2.0 — the upload, and the only purpose the *browser* seals in
+ # production. A disagreement here means no file can be uploaded from any
+ # browser to any node, and the node reports only "it did not open".
+ ("upload", "file_upload", "g" * 32),
+ ("upload", "file_upload_ack", "g" * 32),
]
GROUPBOX_GEK = bytes.fromhex("5a" * 32)
@@ -349,9 +354,11 @@ def test_browser_opens_what_python_sealed(idx, vector, groupbox_js):
@pytest.mark.parametrize("idx,vector", list(enumerate(GROUPBOX_VECTORS)))
def test_python_opens_what_the_browser_sealed(idx, vector, groupbox_js):
"""
- The other direction. Nothing in the SPA seals today — `sealGroup` exists for
- the chat plan, which needs the same primitive — but a codec that only ever
- runs one way is a codec whose encoder is untested.
+ The other direction, and since MNP 2.0 it is a shipping path rather than a
+ precaution: `uploadFile` seals every chunk under `upload`, and the node
+ opens it with `unseal`. The index vectors above still only ever run one way
+ in production, and are kept because a codec whose encoder is untested is a
+ codec with half a test.
"""
from meshbay_common.groupbox import unseal