CR fix: add isinstance check

This commit is contained in:
Yuriy Chebyshev 2022-07-08 15:12:39 +03:00
parent e8b09d3fcf
commit 2dffa0e3dd
2 changed files with 12 additions and 1 deletions

View file

@ -139,3 +139,10 @@ async def test_commands_filter_not_checked():
start_filter = Command(commands=["help", BotCommand("about", "my desc")])
assert not await start_filter.check(message_with_command)
@pytest.mark.asyncio
async def test_commands_filter_not_checked():
with pytest.raises(ValueError):
start_filter = Command(commands=42) # noqa