Merge branch 'dev' into increase-timeout

This commit is contained in:
Kevin Fronczak
2020-05-26 17:04:33 -04:00
committed by GitHub
2 changed files with 15 additions and 2 deletions
+6 -1
View File
@@ -3,7 +3,7 @@
import unittest
from unittest import mock
from requests import exceptions
from blinkpy.auth import Auth, LoginError, TokenRefreshFailed
from blinkpy.auth import Auth, LoginError, TokenRefreshFailed, BlinkBadResponse
import blinkpy.helpers.constants as const
import tests.mock_responses as mresp
@@ -100,6 +100,11 @@ class TestAuth(unittest.TestCase):
fake_resp = "foobar"
self.assertEqual(self.auth.validate_response(fake_resp, False), "foobar")
def test_response_bad_json(self):
"""Check response when not json but expecting json."""
with self.assertRaises(BlinkBadResponse):
self.auth.validate_response(None, True)
def test_header(self):
"""Test header data."""
self.auth.token = "bar"