Skip to content

Commit 4ffdada

Browse files
committed
Add Chat json test.
1 parent d8effd3 commit 4ffdada

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎tests/test_types.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,10 @@ def test_json_update():
120120
assert update.message.message_id == 241
121121
assert update.message.from_user.id == 9734
122122

123+
def test_json_chat():
124+
json_string = r'{"id": -111111,"title": "Test Title","type": "group"}'
125+
chat = types.Chat.de_json(json_string)
126+
assert chat.id == -111111
127+
assert chat.type == 'group'
128+
assert chat.title == 'Test Title'
129+

0 commit comments

Comments
 (0)