Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/test_menubutton.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ def test_de_json_subclass(self, scope_class, bot):
json_dict = {"type": "invalid", "text": self.text, "web_app": self.web_app.to_dict()}
assert type(scope_class.de_json(json_dict, bot)) is scope_class

def test_de_json_empty_data(self, scope_class):
if scope_class in (MenuButtonWebApp,):
pytest.skip(
"This test is not relevant for subclasses that have more attributes than just type"
)
assert isinstance(scope_class.de_json({}, None), scope_class)

def test_to_dict(self, menu_button):
menu_button_dict = menu_button.to_dict()

Expand Down