Skip to content

Conversation

@mindflayer
Copy link
Owner

Fix for #68.

@coveralls
Copy link

coveralls commented Mar 13, 2018

Coverage Status

Coverage increased (+0.5%) to 99.823% when pulling 4089495 on issue-68 into 079f2be on master.

Copy link

@sjaensch sjaensch left a 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!

try:
same_entry = self == Mocket._last_entry
if same_entry:
if same_entry and decode_from_bytes(data).endswith(CRLF):

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.

Copy link
Owner Author

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.

Copy link
Owner Author

@mindflayer mindflayer Mar 16, 2018

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 ==================================================================================

Copy link
Owner Author

@mindflayer mindflayer Mar 16, 2018

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.

Copy link

@sjaensch sjaensch left a 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!

@mindflayer mindflayer merged commit 7680ae9 into master Mar 16, 2018
@mindflayer mindflayer deleted the issue-68 branch March 16, 2018 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants