Clean obsolete code and change configs

This commit is contained in:
jrootjunior 2019-11-15 12:44:24 +02:00
parent d09b72ce6e
commit 65815e509f
58 changed files with 78 additions and 3959 deletions

View file

@ -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}

View file

@ -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)