fix: add tests

This commit is contained in:
Egor 2020-05-30 23:16:33 +03:00
parent 21a55e3e0e
commit 21afa406bd
2 changed files with 17 additions and 0 deletions

View file

@ -457,3 +457,8 @@ WEBHOOK_INFO = {
"has_custom_certificate": False,
"pending_update_count": 0,
}
REPLY_KEYBOARD_MARKUP = {
"keyboard": [[{"text": "something here"}]],
"resize_keyboard": True,
}

View file

@ -0,0 +1,12 @@
from aiogram import types
from .dataset import REPLY_KEYBOARD_MARKUP
reply_keyboard = types.ReplyKeyboardMarkup(**REPLY_KEYBOARD_MARKUP)
def test_serialize():
assert reply_keyboard.to_python() == REPLY_KEYBOARD_MARKUP
def test_deserialize():
assert reply_keyboard.to_object(reply_keyboard.to_python()) == reply_keyboard