Fix blink_functions test
This commit is contained in:
@@ -6,15 +6,7 @@ import blinkpy.helpers.constants as const
|
||||
LOGIN_RESPONSE = {
|
||||
'region': {'mock': 'Test'},
|
||||
'networks': {
|
||||
'summary': {'name': 'TestNetwork'},
|
||||
'networks': [{
|
||||
'name': 'TestNetwork',
|
||||
'account_id': 1111,
|
||||
'id': 2222,
|
||||
'active': 'armed',
|
||||
'armed': True,
|
||||
'arm_string': 'Armed'
|
||||
}]
|
||||
'1234': {'name': 'test', 'onboarded': True}
|
||||
},
|
||||
'authtoken': {'authtoken': 'foobar123', 'message': 'auth'}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,8 @@ class TestBlinkFunctions(unittest.TestCase):
|
||||
fake_req = Request('POST', 'http://wrong.url').prepare()
|
||||
req.side_effect = [
|
||||
mresp.mocked_session_send(fake_req),
|
||||
{'authtoken': {'authtoken': 'foobar123'}}
|
||||
{'authtoken': {'authtoken': 'foobar123'},
|
||||
'networks': {'1234': {'name': 'foobar', 'onboarded': True}}}
|
||||
]
|
||||
self.blink.get_auth_token()
|
||||
self.assertEqual(self.blink.region_id, 'piri')
|
||||
|
||||
Reference in New Issue
Block a user