mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 19:55:10 +02:00
Update aiohttp.py
This commit is contained in:
@@ -15,6 +15,7 @@ class AiohttpClientMocker:
|
|||||||
self.mock_calls = []
|
self.mock_calls = []
|
||||||
|
|
||||||
def request(self, method, url, *,
|
def request(self, method, url, *,
|
||||||
|
auth=None,
|
||||||
status=200,
|
status=200,
|
||||||
text=None,
|
text=None,
|
||||||
content=None,
|
content=None,
|
||||||
@@ -56,7 +57,7 @@ class AiohttpClientMocker:
|
|||||||
return len(self.mock_calls)
|
return len(self.mock_calls)
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def match_request(self, method, url):
|
def match_request(self, method, url, *, auth=None):
|
||||||
"""Match a request against pre-registered requests."""
|
"""Match a request against pre-registered requests."""
|
||||||
for response in self._mocks:
|
for response in self._mocks:
|
||||||
if response.match_request(method, url):
|
if response.match_request(method, url):
|
||||||
|
Reference in New Issue
Block a user