fix empty response into webhook (#1665)

This commit is contained in:
Suren Khorenyan 2025-04-05 20:31:42 +03:00 committed by GitHub
parent 02683b8c37
commit 870d97c783
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 36 additions and 11 deletions

View file

@ -150,13 +150,9 @@ class TestSimpleRequestHandler:
resp = await self.make_reqest(client=client, text="spam")
assert resp.status == 200
assert resp.content_type == "multipart/form-data"
result = {}
reader = MultipartReader.from_response(resp)
while part := await reader.next():
value = await part.read()
result[part.name] = value.decode()
assert not result
assert resp.content_type == "application/json"
expected_result = {}
assert await resp.json() == expected_result
async def test_reply_into_webhook_background(self, bot: MockedBot, aiohttp_client):
app = Application()