Skip to content

Commit

Permalink
Merge pull request #1 from sjaensch/fix-text-response-unmarshalling
Browse files Browse the repository at this point in the history
Fix unmarshalling of non-JSON/msgpack responses
  • Loading branch information
sjaensch committed Jan 11, 2018
2 parents c3e8075 + ddf29f0 commit a239ff7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aiobravado/http_future.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ async def unmarshal_response_inner(response, op):
)

# TODO: Non-json response contents
return response.text
return await response.text


def raise_on_unexpected(http_response):
Expand Down
1 change: 1 addition & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
0.9.1 (2018-XX-XX)
------------------
- bravado version: 9.2.2
- Fix unmarshalling of non-JSON/msgpack responses.

0.9.0 (2017-11-17)
------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/http_future/unmarshall_response_inner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_text_content(mock_get_response_spec, empty_swagger_spec, response_spec,
spec=IncomingResponse,
status_code=200,
headers={'content-type': 'text/plain'},
text='Monday',
text=coroutine(lambda: 'Monday')(),
)

mock_get_response_spec.return_value = response_spec
Expand Down

0 comments on commit a239ff7

Please sign in to comment.