mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 10:11:52 +00:00
Update pydantic to V2 (#1202)
* Update pydantic, fix errors and warnings (all?) * Fixed typehints * Reformat code, removed unused imports * Fixed typing extensions version compatibility * Fixed coverage * Describe changes * Regen code
This commit is contained in:
parent
066d16b522
commit
461e59bbdd
182 changed files with 385 additions and 485 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import datetime
|
||||
|
||||
from aiogram.methods import Request, SendMessage
|
||||
from aiogram.types import Chat, ForceReply, Message
|
||||
from aiogram.types import Chat, ForceReply, Message, ReplyKeyboardRemove
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
|
||||
|
|
@ -24,5 +24,11 @@ class TestSendMessage:
|
|||
|
||||
async def test_force_reply(self):
|
||||
# https://github.com/aiogram/aiogram/issues/901
|
||||
print("::::", SendMessage.__pydantic_core_schema__)
|
||||
method = SendMessage(text="test", chat_id=42, reply_markup=ForceReply())
|
||||
assert isinstance(method.reply_markup, ForceReply)
|
||||
|
||||
async def test_reply_keyboard_remove(self):
|
||||
# https://github.com/aiogram/aiogram/issues/901
|
||||
method = SendMessage(text="test", chat_id=42, reply_markup=ReplyKeyboardRemove())
|
||||
assert isinstance(method.reply_markup, ReplyKeyboardRemove)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue