File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,14 @@ class TestBlinkSyncModule(unittest.TestCase):
17
17
def setUp (self ):
18
18
"""Set up Blink module."""
19
19
self .blink = blinkpy .Blink (username = USERNAME ,
20
- password = PASSWORD )
20
+ password = PASSWORD ,
21
+ motion_interval = 0 )
21
22
# pylint: disable=protected-access
22
23
self .blink ._auth_header = {
23
24
'Host' : 'test.url.tld' ,
24
25
'TOKEN_AUTH' : 'foobar123'
25
26
}
27
+ self .blink .last_refresh = 0
26
28
self .blink .urls = blinkpy .BlinkURLHandler ('test' )
27
29
self .blink .sync ['test' ] = BlinkSyncModule (self .blink ,
28
30
'test' ,
@@ -59,6 +61,12 @@ def test_get_camera_info(self, mock_resp):
59
61
self .assertEqual (self .blink .sync ['test' ].get_camera_info ('1234' ),
60
62
'foobar' )
61
63
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
+
62
70
def test_check_new_videos (self , mock_resp ):
63
71
"""Test recent video response."""
64
72
mock_resp .return_value = {
You can’t perform that action at this time.
0 commit comments