mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
'Refactored by Sourcery'
This commit is contained in:
parent
ae67814abb
commit
e5a5f4c5c5
18 changed files with 50 additions and 85 deletions
|
|
@ -492,7 +492,7 @@ async def test_get_my_commands(bot: Bot, event_loop):
|
|||
async with FakeTelegram(message_data=commands, loop=event_loop):
|
||||
result = await bot.get_my_commands()
|
||||
assert isinstance(result, list)
|
||||
assert all([isinstance(command, types.BotCommand) for command in result])
|
||||
assert all(isinstance(command, types.BotCommand) for command in result)
|
||||
|
||||
|
||||
async def test_edit_message_text_by_bot(bot: Bot, event_loop):
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ def test_DeprecatedReadOnlyClassVarCD():
|
|||
assert DeprecatedReadOnlyClassVar.__slots__ == ("_new_value_getter", "_warning_message")
|
||||
|
||||
new_value_of_deprecated_cls_cd = "mpa"
|
||||
pseudo_owner_cls = type("OpekaCla$$", (), {})
|
||||
deprecated_cd = DeprecatedReadOnlyClassVar("mopekaa", lambda owner: new_value_of_deprecated_cls_cd)
|
||||
|
||||
with pytest.warns(DeprecationWarning):
|
||||
pseudo_owner_cls = type("OpekaCla$$", (), {})
|
||||
assert deprecated_cd.__get__(None, pseudo_owner_cls) == new_value_of_deprecated_cls_cd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue