mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Lint changes
This commit is contained in:
parent
94cff575f2
commit
d980bd7724
1 changed files with 15 additions and 3 deletions
|
|
@ -7,7 +7,15 @@ from aiogram.dispatcher.middlewares.user_context import (
|
|||
EventContext,
|
||||
UserContextMiddleware,
|
||||
)
|
||||
from aiogram.types import Chat, Update, User, ChatBoostUpdated, ChatBoost, ChatBoostSourcePremium, ChatBoostSourceGiftCode
|
||||
from aiogram.types import (
|
||||
Chat,
|
||||
Update,
|
||||
User,
|
||||
ChatBoostUpdated,
|
||||
ChatBoost,
|
||||
ChatBoostSourcePremium,
|
||||
ChatBoostSourceGiftCode,
|
||||
)
|
||||
|
||||
|
||||
async def next_handler(*args, **kwargs):
|
||||
|
|
@ -53,7 +61,9 @@ class TestUserContextMiddleware:
|
|||
expiration_date = datetime.now()
|
||||
|
||||
source = ChatBoostSourcePremium(user=user)
|
||||
boost = ChatBoost(boost_id="Test", add_date=add_date, expiration_date=expiration_date, source=source)
|
||||
boost = ChatBoost(
|
||||
boost_id="Test", add_date=add_date, expiration_date=expiration_date, source=source
|
||||
)
|
||||
update = Update(update_id=42, chat_boost=ChatBoostUpdated(chat=chat, boost=boost))
|
||||
|
||||
await middleware(next_handler, update, data)
|
||||
|
|
@ -70,7 +80,9 @@ class TestUserContextMiddleware:
|
|||
data.clear()
|
||||
|
||||
source = ChatBoostSourceGiftCode(user=user)
|
||||
boost = ChatBoost(boost_id="Test", add_date=add_date, expiration_date=expiration_date, source=source)
|
||||
boost = ChatBoost(
|
||||
boost_id="Test", add_date=add_date, expiration_date=expiration_date, source=source
|
||||
)
|
||||
update = Update(update_id=42, chat_boost=ChatBoostUpdated(chat=chat, boost=boost))
|
||||
|
||||
await middleware(next_handler, update, data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue