Release v0.1.54: scheduled location sessions and paged voice delivery history

This commit is contained in:
Codex
2026-10-19 07:55:36 +08:00
parent ad2614719b
commit 4dc3e2fb9f
28 changed files with 481 additions and 153 deletions
+12
View File
@@ -46,6 +46,18 @@ class VoiceTests(unittest.TestCase):
result=self.send(a,b);self.assertEqual(self.send(a,b)['id'],result['id']);self.assertEqual(len(app.VOICE.messages),1)
self.call(b,'take',id=result['id']);self.send(a,b);self.assertEqual(len(app.VOICE.messages),0)
def test_delivery_requires_device_confirmation_and_is_separate_from_cloud(self):
a,b=self.phone('甲'),self.phone('乙');self.receive(b,a)
key=self.send(a,b)['id'];self.call(b,'take',id=key)
row=app.VOICE.history.existing(key);self.assertEqual(row['delivery'],'transferring');self.assertEqual(row['state'],'pending')
self.call(b,'ack',id=key,status='received')
self.assertEqual(app.VOICE.history.existing(key)['delivery'],'received')
self.assertEqual(app.VOICE.history.existing(key)['state'],'pending')
with self.assertRaises(app.Problem):self.call(a,'ack',id=key,status='received')
self.call(b,'ack',id=key,status='played')
self.assertEqual(app.VOICE.history.existing(key)['delivery'],'played')
with self.assertRaises(app.Problem):self.call(b,'ack',id=key,status='received')
def test_cross_family_and_foreign_inbox_rejected(self):
a,b,c=self.phone('甲'),self.phone('乙'),self.phone('其他',self.other)
with self.assertRaises(app.Problem):self.receive(b,c)