mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 09:55:21 +00:00
Clean obsolete code and change configs
This commit is contained in:
parent
d09b72ce6e
commit
65815e509f
58 changed files with 78 additions and 3959 deletions
|
|
@ -1,20 +0,0 @@
|
|||
import pytest
|
||||
|
||||
from aiogram.dispatcher.filters.builtin import Text
|
||||
|
||||
|
||||
class TestText:
|
||||
@pytest.mark.parametrize(
|
||||
"param, key",
|
||||
[
|
||||
("text", "equals"),
|
||||
("text_contains", "contains"),
|
||||
("text_startswith", "startswith"),
|
||||
("text_endswith", "endswith"),
|
||||
],
|
||||
)
|
||||
def test_validate(self, param, key):
|
||||
value = "spam and eggs"
|
||||
config = {param: value}
|
||||
res = Text.validate(config)
|
||||
assert res == {key: value}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
from aiogram.dispatcher.filters.state import StatesGroup
|
||||
|
||||
|
||||
class TestStatesGroup:
|
||||
def test_all_childs(self):
|
||||
class InnerState1(StatesGroup):
|
||||
pass
|
||||
|
||||
class InnerState2(InnerState1):
|
||||
pass
|
||||
|
||||
class Form(StatesGroup):
|
||||
inner1 = InnerState1
|
||||
inner2 = InnerState2
|
||||
|
||||
form_childs = Form.all_childs
|
||||
assert form_childs == (InnerState1, InnerState2)
|
||||
Loading…
Add table
Add a link
Reference in a new issue