Fixed issue with host name in header, added test to catch this

This commit is contained in:
Kevin Fronczak
2017-03-06 23:20:46 -05:00
parent e0f6384dde
commit 10837e3841
5 changed files with 8 additions and 3 deletions
+1
View File
@@ -66,6 +66,7 @@ class TestBlinkRequests(unittest.TestCase):
self.assertEqual(name, const.CAMERA_NAME)
self.assertEqual(camera.armed, const.ARMED)
self.assertEqual(camera.motion['video'], BASE_URL + const.THUMB + '.mp4')
self.assertEqual(camera.header, const.auth_header)
elif camera.id == str(const.DEVICE_ID2):
self.assertEqual(name, const.CAMERA_NAME2)
self.assertEqual(camera.armed, const.ARMED2)
+4 -1
View File
@@ -24,7 +24,10 @@ if ISONLINE:
ONLINE = 'online'
else:
ONLINE = 'offline'
auth_header = {'Host': REGION_ID+'.immedia-semi.com',
'TOKEN_AUTH': TOKEN
}
response = {'account': {'notifications': 1},
'devices': [{'device_type': 'camera',