mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fix: rm parenthesized context manager
This commit is contained in:
parent
5a6bdfd54b
commit
b6e28a0b90
1 changed files with 2 additions and 4 deletions
|
|
@ -481,10 +481,8 @@ class TestDispatcher:
|
|||
|
||||
async def test_listen_unknown_update(self):
|
||||
dp = Dispatcher()
|
||||
with (
|
||||
pytest.raises(SkipHandler),
|
||||
pytest.warns(RuntimeWarning, match="Detected unknown update type") as record,
|
||||
):
|
||||
pattern = "Detected unknown update type"
|
||||
with pytest.raises(SkipHandler), pytest.warns(RuntimeWarning, match=pattern) as record:
|
||||
await dp._listen_update(Update(update_id=42))
|
||||
if not record:
|
||||
pytest.fail("Expected 'Detected unknown update type' warning.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue