Add PTZ nudges, configurable monitoring wall and lunar family dates
This commit is contained in:
+16
@@ -216,6 +216,22 @@ class WebTests(unittest.TestCase):
|
||||
self.assertIn('h264_vaapi', command)
|
||||
self.assertIn('pipe:1', command)
|
||||
|
||||
def test_ptz_requires_both_space_and_control_permission(self):
|
||||
camera = dict(id='e'*16, name='Test', siteId='permitted', enabled=True)
|
||||
viewer = dict(role='member', siteIds=['permitted'], ptzControl=False)
|
||||
with self.assertRaises(app.Problem):app.ACCOUNTS.control(viewer, camera)
|
||||
viewer['ptzControl'] = True
|
||||
self.assertEqual(app.ACCOUNTS.control(viewer, camera), camera)
|
||||
viewer['siteIds'] = []
|
||||
with self.assertRaises(app.Problem):app.ACCOUNTS.control(viewer, camera)
|
||||
self.assertEqual(self.request('/api/ptz?camera='+'e'*16,False)[0],401)
|
||||
|
||||
def test_family_defaults_alive_and_rejects_death_for_alive(self):
|
||||
p=app.FAMILY.person({'name':'Example'},None)
|
||||
self.assertEqual(p['lifeStatus'],'alive')
|
||||
with self.assertRaises(app.Problem):app.FAMILY.person({'name':'Example','deathDate':'2020-01-01'},None)
|
||||
self.assertEqual(app.FAMILY.person({'name':'Example','lifeStatus':'deceased','deathDate':'2020-01-01'},None)['deathDate'],'2020-01-01')
|
||||
|
||||
def test_empty_recording_day_is_not_service_failure(self):
|
||||
error = app.urllib.error.HTTPError('http://localhost/list', 404, 'Not Found', {},
|
||||
io.BytesIO(b'{"error":"no recording segments found"}'))
|
||||
|
||||
Reference in New Issue
Block a user