Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion google/auth/transport/_aiohttp_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def data(self):

async def raw_content(self):
if self._raw_content is None:
self._raw_content = await self._response.content.read()
self._raw_content = await self._response.read()
return self._raw_content

async def content(self):
Expand Down
4 changes: 2 additions & 2 deletions tests_async/transport/test_aiohttp_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test__is_compressed_not(self):
@pytest.mark.asyncio
async def test_raw_content(self):
mock_response = mock.AsyncMock()
mock_response.content.read.return_value = mock.sentinel.read
mock_response.read.return_value = mock.sentinel.read
combined_response = aiohttp_requests._CombinedResponse(response=mock_response)
raw_content = await combined_response.raw_content()
assert raw_content == mock.sentinel.read
Expand All @@ -53,7 +53,7 @@ async def test_raw_content(self):
@pytest.mark.asyncio
async def test_content(self):
mock_response = mock.AsyncMock()
mock_response.content.read.return_value = mock.sentinel.read
mock_response.read.return_value = mock.sentinel.read
combined_response = aiohttp_requests._CombinedResponse(response=mock_response)
content = await combined_response.content()
assert content == mock.sentinel.read
Expand Down