Skip to content

Commit

Permalink
revert change to aiohttp
Browse files Browse the repository at this point in the history
  • Loading branch information
iscai-msft committed Mar 4, 2021
1 parent bf96ec9 commit 9159595
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def __init__(self, request: HttpRequest, aiohttp_response: aiohttp.ClientRespons
self.status_code = aiohttp_response.status
self.headers = CIMultiDict(aiohttp_response.headers)
self.reason = aiohttp_response.reason
self.content_type = self.headers.get('content-type')
self.content_type = aiohttp_response.headers.get('content-type')
self._body = None

def body(self) -> bytes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ async def test_aiohttp_response_text():
def test_repr():
res = _create_aiohttp_response(
b'\xef\xbb\xbf56',
{'Content-Type': 'text/plain'}
{}
)
res.content_type = "text/plain"

assert repr(res) == "<AioHttpTransportResponse: 200 OK, Content-Type: text/plain>"

0 comments on commit 9159595

Please sign in to comment.