Fix blink_functions test

This commit is contained in:
Kevin Fronczak
2018-10-16 13:52:09 -04:00
parent 13bb819e07
commit 5057592b0d
2 changed files with 3 additions and 10 deletions
+1 -9
View File
@@ -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'}
}
+2 -1
View File
@@ -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')