mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 18:01:04 +00:00
Pydoc observer
This commit is contained in:
parent
d39bbc3952
commit
ad17143d3f
2 changed files with 72 additions and 30 deletions
|
|
@ -177,15 +177,15 @@ class TestTelegramEventObserver:
|
|||
assert any(isinstance(item, MyFilter1) for item in resolved)
|
||||
|
||||
# Unknown filter
|
||||
with pytest.raises(ValueError, match="Unknown filters: {'@bad'}"):
|
||||
with pytest.raises(ValueError, match="Unknown keyword filters: {'@bad'}"):
|
||||
assert observer.resolve_filters({"@bad": "very"})
|
||||
|
||||
# Unknown filter
|
||||
with pytest.raises(ValueError, match="Unknown filters: {'@bad'}"):
|
||||
with pytest.raises(ValueError, match="Unknown keyword filters: {'@bad'}"):
|
||||
assert observer.resolve_filters({"test": "ok", "@bad": "very"})
|
||||
|
||||
# Bad argument type
|
||||
with pytest.raises(ValueError, match="Unknown filters: {'test'}"):
|
||||
with pytest.raises(ValueError, match="Unknown keyword filters: {'test'}"):
|
||||
assert observer.resolve_filters({"test": ...})
|
||||
|
||||
def test_register(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue