Fixed tests, fixed misspelling, and fixed a small error in _request method
This commit is contained in:
@@ -122,7 +122,8 @@ class TestBlinkFunctions(unittest.TestCase):
|
||||
"""Checks that the update function is doing the right thing."""
|
||||
self.test_urls = blinkpy.BlinkURLHandler('test')
|
||||
test_config = mresp.FIRST_CAMERA
|
||||
test_camera = blinkpy.blinkpy.BlinkCamera(test_config, self.test_urls)
|
||||
self.urls = self.test_urls
|
||||
test_camera = blinkpy.blinkpy.BlinkCamera(test_config, self)
|
||||
test_update = mresp.SECOND_CAMERA
|
||||
test_camera.update(test_update)
|
||||
test_image_url = self.test_urls.base_url + test_update['thumbnail']
|
||||
|
||||
@@ -47,7 +47,7 @@ class TestBlinkSetup(unittest.TestCase):
|
||||
self.blink_no_cred.get_auth_token()
|
||||
|
||||
def test_no_auth_header(self):
|
||||
"""Check that we throw an excpetion when no auth header given."""
|
||||
"""Check that we throw an excepetion when no auth header given."""
|
||||
# pylint: disable=unused-variable
|
||||
(region_id, region), = mresp.LOGIN_RESPONSE['region'].items()
|
||||
self.blink.urls = blinkpy.BlinkURLHandler(region_id)
|
||||
@@ -79,7 +79,7 @@ class TestBlinkSetup(unittest.TestCase):
|
||||
|
||||
with self.assertRaises(blinkpy.BlinkAuthenticationException):
|
||||
# pylint: disable=protected-access
|
||||
blinkpy.blinkpy._request(None, reqtype='post')
|
||||
blinkpy.blinkpy._request(None, reqtype='post', is_retry=True)
|
||||
|
||||
@mock.patch('blinkpy.blinkpy.requests.post',
|
||||
side_effect=mresp.mocked_requests_post)
|
||||
|
||||
Reference in New Issue
Block a user