Skip to content

Commit 50b1a35

Browse files
committed
Update tests
1 parent b88a5fe commit 50b1a35

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/test_sync_module.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ class TestBlinkSyncModule(unittest.TestCase):
1717
def setUp(self):
1818
"""Set up Blink module."""
1919
self.blink = blinkpy.Blink(username=USERNAME,
20-
password=PASSWORD)
20+
password=PASSWORD,
21+
motion_interval=0)
2122
# pylint: disable=protected-access
2223
self.blink._auth_header = {
2324
'Host': 'test.url.tld',
2425
'TOKEN_AUTH': 'foobar123'
2526
}
27+
self.blink.last_refresh = 0
2628
self.blink.urls = blinkpy.BlinkURLHandler('test')
2729
self.blink.sync['test'] = BlinkSyncModule(self.blink,
2830
'test',
@@ -59,6 +61,12 @@ def test_get_camera_info(self, mock_resp):
5961
self.assertEqual(self.blink.sync['test'].get_camera_info('1234'),
6062
'foobar')
6163

64+
def test_check_new_videos_startup(self, mock_resp):
65+
"""Test that check_new_videos does not block startup."""
66+
sync_module = self.blink.sync['test']
67+
self.blink.last_refresh = None
68+
self.assertFalse(sync_module.check_new_videos())
69+
6270
def test_check_new_videos(self, mock_resp):
6371
"""Test recent video response."""
6472
mock_resp.return_value = {

0 commit comments

Comments
 (0)