Added vieo endpoint key changes to motion detect logic
This commit is contained in:
@@ -62,9 +62,9 @@ class TestBlinkSyncModule(unittest.TestCase):
|
||||
def test_check_new_videos(self, mock_resp):
|
||||
"""Test recent video response."""
|
||||
mock_resp.return_value = {
|
||||
'videos': [{
|
||||
'camera_name': 'foo',
|
||||
'address': '/foo/bar.mp4',
|
||||
'media': [{
|
||||
'device_name': 'foo',
|
||||
'media': '/foo/bar.mp4',
|
||||
'created_at': '1970-01-01T00:00:00+0:00'
|
||||
}]
|
||||
}
|
||||
@@ -76,7 +76,7 @@ class TestBlinkSyncModule(unittest.TestCase):
|
||||
{'clip': '/foo/bar.mp4',
|
||||
'time': '1970-01-01T00:00:00+0:00'})
|
||||
self.assertEqual(sync_module.motion, {'foo': True})
|
||||
mock_resp.return_value = {'videos': []}
|
||||
mock_resp.return_value = {'media': []}
|
||||
self.assertTrue(sync_module.check_new_videos())
|
||||
self.assertEqual(sync_module.motion, {'foo': False})
|
||||
self.assertEqual(sync_module.last_record['foo'],
|
||||
|
||||
Reference in New Issue
Block a user