From 4ffdada42751be40fff4b488bdf99eb1bb632270 Mon Sep 17 00:00:00 2001 From: eternnoir Date: Mon, 12 Oct 2015 10:37:25 +0800 Subject: [PATCH] Add Chat json test. --- tests/test_types.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_types.py b/tests/test_types.py index 75c2638..f8987ad 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -120,3 +120,10 @@ def test_json_update(): assert update.message.message_id == 241 assert update.message.from_user.id == 9734 +def test_json_chat(): + json_string = r'{"id": -111111,"title": "Test Title","type": "group"}' + chat = types.Chat.de_json(json_string) + assert chat.id == -111111 + assert chat.type == 'group' + assert chat.title == 'Test Title' +