mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
Reworked InputFile sending (#1238)
* Reworked InputFile sending * Added changelog
This commit is contained in:
parent
c7b7714959
commit
a7916c1103
7 changed files with 32 additions and 34 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import asyncio
|
||||
from typing import Any, AsyncContextManager, AsyncGenerator, Dict, List
|
||||
from typing import Any, AsyncContextManager, AsyncGenerator, AsyncIterable, Dict, List
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
import aiohttp_socks
|
||||
|
|
@ -156,7 +156,7 @@ class TestAiohttpSession:
|
|||
assert fields[1][2].startswith("attach://")
|
||||
assert fields[2][0]["name"] == fields[1][2][9:]
|
||||
assert fields[2][0]["filename"] == "file.txt"
|
||||
assert isinstance(fields[2][2], BareInputFile)
|
||||
assert isinstance(fields[2][2], AsyncIterable)
|
||||
|
||||
async def test_make_request(self, bot: MockedBot, aresponses: ResponsesMockServer):
|
||||
aresponses.add(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue