Add tests for BaseSession and TelegramAPIServer

This commit is contained in:
Alex Root Junior 2019-11-16 00:52:18 +02:00
parent c824b298c9
commit a24708d589
12 changed files with 159 additions and 9 deletions

View file

@ -1,4 +1,5 @@
import pytest
from aiogram.utils.helper import Helper, HelperMode, Item, ListItem, OrderedHelper

View file

@ -1,4 +1,5 @@
import pytest
from aiogram.utils.mixins import ContextInstanceMixin, DataMixin
@ -47,5 +48,7 @@ class TestContextInstanceMixin:
def test_set_wrong_type(self):
obj = ContextObject()
with pytest.raises(TypeError, match=r"Value should be instance of 'ContextObject' not '.+'"):
with pytest.raises(
TypeError, match=r"Value should be instance of 'ContextObject' not '.+'"
):
obj.set_current(42)