-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
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
Propagate match_info in make_mocked_request #2331
Propagate match_info in make_mocked_request #2331
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document a new parameter here: http://aiohttp.readthedocs.io/en/stable/testing.html#aiohttp.test_utils.make_mocked_request
.. versionadded: 2.3
would be nice
aiohttp/test_utils.py
Outdated
@@ -564,7 +565,7 @@ def timeout(*args, **kw): | |||
protocol, payload_writer, task, loop, | |||
client_max_size=client_max_size) | |||
|
|||
match_info = UrlMappingMatchInfo({}, mock.Mock()) | |||
match_info = UrlMappingMatchInfo({} if match_info is sentinel else match_info, mock.Mock()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the line too long?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't give any problems to me, waiting for the automated checks to pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You didn't run make test
, travis blames exactly the line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, didn't run because was failing on my machine for some reason, that's why I was letting travis do the job.
In case you had this before, that's what I'm getting: ValueError: option names {'--fast'} already added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uninstalling pytest-aiohttp
worked for me
Added the doc about the new attribute but the docs of that method are with sphinx format. I'll check how do display that info in that format. Have to leave for 1/2 hours now. |
NP, I've polished doc. FYI: http://aiohttp.readthedocs.io/en/stable/contributing.html#documentation |
You shouldn't install |
Makes sense. I think I had it installed because of reusing venvs between aiohttp and pytest-aiohttp |
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. |
#2330