Add python 3.7 to travis and tox (#14523)
* Add python 3.7 to travis and tox * Use pyyaml from github * Don't version constraints * Fix version tag * Change to new pyyaml release * Python 3.7 requires xenial * Fix namespace detection * Use correct RegEx type * Update pexpect to 4.6 * Use correct validation for dictionaries * Disable Py37 incompatible packages * Upgrade all pexpect to 4.6 * Add explicit None as default param
This commit is contained in:
parent
bd62248841
commit
02238b6412
16 changed files with 33 additions and 17 deletions
|
@ -11,6 +11,8 @@ from yarl import URL
|
|||
|
||||
from aiohttp.client_exceptions import ClientResponseError
|
||||
|
||||
retype = type(re.compile(''))
|
||||
|
||||
|
||||
class AiohttpClientMocker:
|
||||
"""Mock Aiohttp client requests."""
|
||||
|
@ -40,7 +42,7 @@ class AiohttpClientMocker:
|
|||
if content is None:
|
||||
content = b''
|
||||
|
||||
if not isinstance(url, re._pattern_type):
|
||||
if not isinstance(url, retype):
|
||||
url = URL(url)
|
||||
if params:
|
||||
url = url.with_query(params)
|
||||
|
@ -146,7 +148,7 @@ class AiohttpClientMockResponse:
|
|||
return False
|
||||
|
||||
# regular expression matching
|
||||
if isinstance(self._url, re._pattern_type):
|
||||
if isinstance(self._url, retype):
|
||||
return self._url.search(str(url)) is not None
|
||||
|
||||
if (self._url.scheme != url.scheme or self._url.host != url.host or
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue