We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
just like the demo in official website http://aiohttp.readthedocs.io/en/stable/client.html
async with aiohttp.ClientSession() as session: async with session.get('https://api.github.com/events') as resp: print(resp.status) print(await resp.text())
while the types of resp.url and resp.url_obj are aiohttp.URL instance it means that assert does not work like this:
resp.url
resp.url_obj
aiohttp.URL
assert resp.url == 'http://httpbin.org/get?key2=value2&key1=value1'
in my code while pytesting. it raise like that:
AssertionError: assert URL('http://127.0.0.1:40404/123') == 'http://127.0.0.1:40404/123'
but, actually, the str of URL is the same as http://127.0.0.1:40404/123
http://127.0.0.1:40404/123
is that any feature instead of? or is it a bug?
The text was updated successfully, but these errors were encountered:
In aiohttp 1.1+ ,url pointed to str but .url_obj to URL. Starting from aiohtp 2.0 they are aliases, .url_obj is deprecated.
,url
str
.url_obj
URL
Docs should be updated, most likely in the way like this: assert str(resp.url) == 'htpp://....'
assert str(resp.url) == 'htpp://....'
Sorry, something went wrong.
6e57621
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that new issue.
No branches or pull requests
just like the demo in official website http://aiohttp.readthedocs.io/en/stable/client.html
while the types of
resp.url
andresp.url_obj
areaiohttp.URL
instanceit means that assert does not work like this:
in my code while pytesting.
it raise like that:
but, actually, the str of URL is the same as
http://127.0.0.1:40404/123
is that any feature instead of? or is it a bug?
The text was updated successfully, but these errors were encountered: