-
Notifications
You must be signed in to change notification settings - Fork 48
Issue 68 #70
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
Issue 68 #70
Conversation
sjaensch
left a comment
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.
Hey @mindflayer, sorry for the late response!
mocket/mockhttp.py
Outdated
| try: | ||
| same_entry = self == Mocket._last_entry | ||
| if same_entry: | ||
| if same_entry and decode_from_bytes(data).endswith(CRLF): |
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.
Unfortunately, this check is not accurate enough: the condition is also true for multipart requests, e.g. when doing file uploads. It fixes one of the POST request tests, but the file upload test still fails.
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.
I also have a multipart test, but none of them using asyncio. Thank you.
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.
It seems fixed with the last commit I pushed to the branch:
$ pytest tests/functional/request_func_test.py::test_file_upload_in_request
========================================================================================== test session starts ===========================================================================================
platform darwin -- Python 3.6.4, pytest-3.4.2, py-1.5.2, pluggy-0.6.0
rootdir: /Users/drizzt/repos/aiobravado, inifile: tox.ini
plugins: asyncio-0.8.0
collected 1 item
tests/functional/request_func_test.py . [100%]
============================================================================================ warnings summary ============================================================================================
tests/functional/request_func_test.py::test_file_upload_in_request
/Users/drizzt/repos/aiobravado/tests/functional/conftest.py:84: RuntimeWarning: coroutine 'ClientSession.close' was never awaited
http_client.client_session.close()
-- Docs: http://doc.pytest.org/en/latest/warnings.html
================================================================================== 1 passed, 1 warnings in 0.05 seconds ==================================================================================
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.
Test results from your make test are outputting a 96 passed, 17 xfailed, 2 xpassed, 46 warnings in 4.37 seconds.
sjaensch
left a comment
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.
This fixes it for me, thanks a lot!
Fix for #68.