mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-08 17:13:56 +00:00
Add tests for BaseSession and TelegramAPIServer
This commit is contained in:
parent
c824b298c9
commit
a24708d589
12 changed files with 159 additions and 9 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import pytest
|
||||
|
||||
from aiogram.utils.helper import Helper, HelperMode, Item, ListItem, OrderedHelper
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue