File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 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):
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 = {
You can’t perform that action at this time.
0 commit comments