Reworked defaults

This commit is contained in:
JRoot Junior 2024-01-03 00:02:41 +02:00
parent 1281bf551a
commit 47bd869bbd
No known key found for this signature in database
GPG key ID: 738964250D5FF6E2
139 changed files with 591 additions and 531 deletions

View file

@ -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")