Separate system accounts and household people, add generation directory and consented member location sharing

This commit is contained in:
Codex
2026-10-18 20:00:43 +08:00
parent 67bc5a1ba9
commit 3b2c046060
52 changed files with 1497 additions and 311 deletions
+4 -1
View File
@@ -28,6 +28,9 @@ class ArchiveTests(unittest.TestCase):
return file,row
def cloud(self, fail=False):
def prepare(source,target,row,*names):
target.write_bytes(source.read_bytes());return dict(codec='hevc',start='fixture')
p=patch('recording_format.prepare',prepare);p.start();self.addCleanup(p.stop)
def upload(key,p,remote,progress=None):
if progress:progress(1,1)
return dict(path=remote,size=p.stat().st_size,fs_id=123)
@@ -42,7 +45,7 @@ class ArchiveTests(unittest.TestCase):
self.assertTrue(app.ARCHIVE.process_one())
verify.assert_called_once();self.assertFalse(file.exists())
result=app.ARCHIVE.row(row['id']);self.assertEqual(result['state'],'cloud')
self.assertIn('/'+self.aid+'/'+row['camera']+'/',result['remote'])
self.assertIn('_'+self.aid+'/摄像头/camera-0_'+row['camera']+'/',result['remote'])
self.assertEqual(result['released_bytes'],len(b'closed-video-fixture'))
self.assertGreater(result['released_at'],0)