aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_android_shell.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/tests/test_android_shell.py')
-rw-r--r--packages/meshbay-hub/tests/test_android_shell.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/meshbay-hub/tests/test_android_shell.py b/packages/meshbay-hub/tests/test_android_shell.py
index 5262aae..b92cfef 100644
--- a/packages/meshbay-hub/tests/test_android_shell.py
+++ b/packages/meshbay-hub/tests/test_android_shell.py
@@ -138,12 +138,16 @@ def test_the_shim_offers_desktop_channels_and_native_answers_each():
SRC / "cast" / "CastChannels.kt", SRC / "notify" / "PushChannels.kt",
SRC / "photos" / "PhotoChannels.kt"):
native |= set(re.findall(r'^\s*"([\w:-]+)" ->', _read(path), flags=re.M))
+ # Contacts and messages share one class, its channels named by a prefix.
+ docs = set(re.findall(r'^\s*"(\w+)" ->', _read(SRC / "phonesync" / "DocChannels.kt"), flags=re.M))
+ for prefix in re.findall(r'DocChannels\("(\w+)"', _read(SRC / "MainActivity.kt")):
+ native |= {f"{prefix}:{name}" for name in docs}
shim = _shim_channels()
assert shim, "no channel found in 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
+ # A phone has a push distributor to talk to and a camera roll and an
+ # address book to back up, and a desktop has none of them; 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:"))}
+ phone_only = {c for c in shim if c.startswith(("push:", "photosync:", "contactsync:"))}
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}"