Fix ingress bug with Firefox (#23121)

* Fix ingress bug with Firefox

* Fix mock

* Fix tests

* Fix test lint
This commit is contained in:
Pascal Vizeli 2019-04-16 00:27:13 +02:00 committed by Paulus Schoutsen
parent 60c787c2e6
commit 7a78d65633
4 changed files with 81 additions and 10 deletions

View file

@ -82,6 +82,10 @@ class AiohttpClientMocker:
"""Register a mock options request."""
self.request('options', *args, **kwargs)
def patch(self, *args, **kwargs):
"""Register a mock patch request."""
self.request('patch', *args, **kwargs)
@property
def call_count(self):
"""Return the number of requests made."""
@ -102,7 +106,7 @@ class AiohttpClientMocker:
async def match_request(self, method, url, *, data=None, auth=None,
params=None, headers=None, allow_redirects=None,
timeout=None, json=None, cookies=None):
timeout=None, json=None, cookies=None, **kwargs):
"""Match a request against pre-registered requests."""
data = data or json
url = URL(url)