-
-
Notifications
You must be signed in to change notification settings - Fork 803
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add support init fields from parent object in KeyboardButton (#344)
* fix: add support init fields from parent object in KeyboardButton * fix: add tests
- Loading branch information
Showing
3 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |