Add some additional tests around radio and contact management

This commit is contained in:
Jack Kingsman
2026-01-30 21:45:50 -08:00
parent 49bcdc48e7
commit 8674e804c2
4 changed files with 960 additions and 4 deletions
+8 -2
View File
@@ -73,7 +73,10 @@ class TestOutgoingDMBotTrigger:
db_contact = Contact(public_key="ab" * 32, name="Alice")
# Bot that would take a long time
slow_bot = AsyncMock(side_effect=lambda **kw: asyncio.sleep(10))
async def _slow(**kw):
await asyncio.sleep(10)
slow_bot = AsyncMock(side_effect=_slow)
with (
patch("app.routers.messages.require_connected", return_value=mc),
@@ -179,7 +182,10 @@ class TestOutgoingChannelBotTrigger:
mc = _make_mc(name="MyNode")
db_channel = Channel(key="cc" * 16, name="#slow")
slow_bot = AsyncMock(side_effect=lambda **kw: asyncio.sleep(10))
async def _slow(**kw):
await asyncio.sleep(10)
slow_bot = AsyncMock(side_effect=_slow)
with (
patch("app.routers.messages.require_connected", return_value=mc),