mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Reworked defaults
This commit is contained in:
parent
1281bf551a
commit
47bd869bbd
139 changed files with 591 additions and 531 deletions
|
|
@ -12,6 +12,7 @@ from aiogram.client.session.aiohttp import AiohttpSession
|
|||
from aiogram.client.telegram import TelegramAPIServer
|
||||
from aiogram.methods import GetFile, GetMe
|
||||
from aiogram.types import File, PhotoSize
|
||||
from tests.deprecated import check_deprecated
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
|
||||
|
|
@ -41,6 +42,13 @@ class TestBot:
|
|||
assert isinstance(bot.session, AiohttpSession)
|
||||
assert bot.id == 42
|
||||
|
||||
def test_init_default(self):
|
||||
with check_deprecated(
|
||||
max_version="3.5.0",
|
||||
exception=TypeError,
|
||||
):
|
||||
bot = Bot(token="42:Test", parse_mode="HTML")
|
||||
|
||||
def test_hashable(self):
|
||||
bot = Bot("42:TEST")
|
||||
assert hash(bot) == hash("42:TEST")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue