aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_drive_sync.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-10 17:09:12 +0200
committerChristophe Besson <cbesson@gmail.com>2026-10-10 17:09:12 +0200
commitb39e73cbb279ab0274e8cd0b84304a602fe1d5ef (patch)
tree91e86b70289f5c0252372f4f05b83b38f049c64f /packages/meshbay-hub/tests/test_drive_sync.py
parentff982773308d042e4ec68fae9cad5c5742bc7395 (diff)
downloadmeshbay-main.tar.gz
fix(android): what the first backup on a phone showedHEADmain
Slices are asked for in the address, not a Range header the WebView drops; a settings change runs at once; the notification is updated once a second; the SMS section says how to lift Android's restricted setting; the photo section says whether videos are included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/tests/test_drive_sync.py')
-rw-r--r--packages/meshbay-hub/tests/test_drive_sync.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/meshbay-hub/tests/test_drive_sync.py b/packages/meshbay-hub/tests/test_drive_sync.py
index 342b310..3861585 100644
--- a/packages/meshbay-hub/tests/test_drive_sync.py
+++ b/packages/meshbay-hub/tests/test_drive_sync.py
@@ -41,11 +41,11 @@ doc.visibilityState = 'visible';
globalThis.window = win;
globalThis.document = doc;
globalThis.localStorage = { getItem() { return null; }, setItem() {}, removeItem() {} };
-globalThis.fetch = async (url, opts) => {
- const range = opts && opts.headers && opts.headers.Range;
- fake.log.push(['fetch', url, range || null]);
- const m = /bytes=(\d+)-(\d+)/.exec(range || '');
- return { ok: true, status: m ? 206 : 200,
+globalThis.fetch = async (url) => {
+ const [path, query] = url.split('?');
+ const m = /range=(\d+)-(\d+)/.exec(query || '');
+ fake.log.push(['fetch', path, m ? `bytes=${m[1]}-${m[2]}` : null]);
+ return { ok: true, status: 200,
arrayBuffer: async () => new ArrayBuffer(m ? Number(m[2]) - Number(m[1]) + 1 : 0) };
};
fake.status = {