Clean up Google Assistant (#11375)

* Clean up Google Assistant

* Fix tests
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2017-12-31 15:04:49 -08:00
1 parent fcbf7abdaa
commit fc8b25a71f
6 files changed
+165 -183

No files matched your search

+8
View File
@@ -7,6 +7,8 @@ from unittest import mock
from urllib.parse import urlparse, parse_qs
import yarl
from aiohttp.client_exceptions import ClientResponseError
class AiohttpClientMocker:
"""Mock Aiohttp client requests."""
@@ -189,6 +191,12 @@ class AiohttpClientMockResponse:
"""Mock release."""
pass
def raise_for_status(self):
"""Raise error if status is 400 or higher."""
if self.status >= 400:
raise ClientResponseError(
None, None, code=self.status, headers=self.headers)
def close(self):
"""Mock close."""
pass