diff options
Diffstat (limited to 'packages/meshbay-hub/tests/test_android_shell.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_android_shell.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/packages/meshbay-hub/tests/test_android_shell.py b/packages/meshbay-hub/tests/test_android_shell.py index 129732c..5262aae 100644 --- a/packages/meshbay-hub/tests/test_android_shell.py +++ b/packages/meshbay-hub/tests/test_android_shell.py @@ -135,14 +135,17 @@ def test_the_shim_offers_desktop_channels_and_native_answers_each(): preload = set(re.findall(r"ipcRenderer\.invoke\('([\w:-]+)'", preload_js)) native = set() for path in (SRC / "bridge" / "Channels.kt", SRC / "bridge" / "KeyChannels.kt", - SRC / "cast" / "CastChannels.kt", SRC / "notify" / "PushChannels.kt"): + SRC / "cast" / "CastChannels.kt", SRC / "notify" / "PushChannels.kt", + SRC / "photos" / "PhotoChannels.kt"): native |= set(re.findall(r'^\s*"([\w:-]+)" ->', _read(path), flags=re.M)) shim = _shim_channels() assert shim, "no channel found in the shim" - # A phone has a push distributor to talk to and a desktop does not; that - # family is the one the desktop lacks rather than the one it shares. - phone_only = {c for c in shim if c.startswith("push:")} - assert phone_only, "the push channels are gone from the shim" + # A phone has a push distributor to talk to and a camera roll to back up, + # and a desktop has neither; those families are the ones the desktop lacks + # rather than the ones it shares. + phone_only = {c for c in shim if c.startswith(("push:", "photosync:"))} + assert any(c.startswith("push:") for c in phone_only), "the push channels are gone" + assert any(c.startswith("photosync:") for c in phone_only), "the backup channels are gone" assert shim - phone_only <= preload, f"channels the desktop does not have: {shim - preload}" assert shim == native, f"shim and native disagree: {shim ^ native}" |