aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests/test_content_blocklist.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-node/tests/test_content_blocklist.py')
-rw-r--r--packages/meshbay-node/tests/test_content_blocklist.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/meshbay-node/tests/test_content_blocklist.py b/packages/meshbay-node/tests/test_content_blocklist.py
index 0e07787..8e0b790 100644
--- a/packages/meshbay-node/tests/test_content_blocklist.py
+++ b/packages/meshbay-node/tests/test_content_blocklist.py
@@ -129,7 +129,7 @@ async def test_a_public_group_refuses_a_blocked_file_and_its_thumbnail(tmp_path)
@pytest.mark.asyncio
async def test_a_public_group_does_not_list_a_blocked_file(tmp_path):
s, gek = _session("public", tmp_path)
- s._do_index_sync()
+ await s._do_index_sync()
payload = unseal(gek, PURPOSE_INDEX, "index_sync", GROUP, s._channel.sent[-1])
assert [e["id"] for e in payload["entries"]] == [KEPT]
@@ -137,7 +137,7 @@ async def test_a_public_group_does_not_list_a_blocked_file(tmp_path):
@pytest.mark.asyncio
async def test_a_private_group_is_untouched(tmp_path):
s, gek = _session("private", tmp_path)
- s._do_index_sync()
+ await s._do_index_sync()
payload = unseal(gek, PURPOSE_INDEX, "index_sync", GROUP, s._channel.sent[-1])
assert sorted(e["id"] for e in payload["entries"]) == [BLOCKED, KEPT]
assert not s._refuse_blocked(BLOCKED)
@@ -218,14 +218,15 @@ def _daemon(tmp_path, visibility: str):
return daemon, session, gek
-def test_a_pushed_block_resends_the_index_without_the_file(tmp_path):
+@pytest.mark.asyncio
+async def test_a_pushed_block_resends_the_index_without_the_file(tmp_path):
daemon, session, gek = _daemon(tmp_path, "public")
- daemon._on_blocklist_update([BLOCKED], [])
+ await daemon._on_blocklist_update([BLOCKED], [])
msg = session._send.call_args[0][0]
ids = [e["id"] for e in unseal(gek, PURPOSE_INDEX, "index_sync", GROUP, msg)["entries"]]
assert ids == [KEPT]
- daemon._on_blocklist_update([], [BLOCKED])
+ await daemon._on_blocklist_update([], [BLOCKED])
msg = session._send.call_args[0][0]
ids = sorted(e["id"] for e in unseal(gek, PURPOSE_INDEX, "index_sync", GROUP, msg)["entries"])
assert ids == [BLOCKED, KEPT]