feat: add cold display alarm flow and labeled snapshots
This commit is contained in:
@@ -16,7 +16,9 @@ class ConfigTests(unittest.TestCase):
|
||||
camera_id = "cam_a"
|
||||
|
||||
[thresholds]
|
||||
pre_warning_seconds = 20
|
||||
max_dwell_seconds = 30
|
||||
alarm_removal_seconds = 2
|
||||
trash_confirmation_seconds = 4
|
||||
|
||||
[layout]
|
||||
@@ -29,7 +31,9 @@ cols = 2
|
||||
settings = load_settings(path)
|
||||
|
||||
self.assertEqual(settings.camera_id, "cam_a")
|
||||
self.assertEqual(settings.pre_warning_seconds, 20)
|
||||
self.assertEqual(settings.max_dwell_seconds, 30)
|
||||
self.assertEqual(settings.alarm_removal_seconds, 2)
|
||||
self.assertEqual(settings.trash_confirmation_seconds, 4)
|
||||
self.assertEqual(settings.zone_ids, ("r1c1", "r1c2"))
|
||||
|
||||
@@ -118,6 +122,8 @@ zone_ids = ["1", "2", "3"]
|
||||
text = path.read_text(encoding="utf-8")
|
||||
|
||||
self.assertIn("zone_count = 2", text)
|
||||
self.assertIn("pre_warning_seconds = 0", text)
|
||||
self.assertIn("alarm_removal_seconds = 0", text)
|
||||
self.assertIn('label = "区域 1"', text)
|
||||
self.assertIn("[trash]", text)
|
||||
self.assertNotIn('"trash"', text.split("[layout]", maxsplit=1)[1].split("[[zones]]", maxsplit=1)[0])
|
||||
|
||||
Reference in New Issue
Block a user