From c598a7d82a8f1aa1a91f5ca54ebbcc4d6503466f Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 27 Jan 2018 22:38:22 +0200 Subject: [PATCH] Update tests (small fixes) --- tests/types/test_chat.py | 2 +- tests/types/test_game.py | 1 + tests/types/test_message.py | 2 +- tests/types/test_update.py | 2 +- tests/types/test_user.py | 4 ++-- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/types/test_chat.py b/tests/types/test_chat.py index c2b6de4a..1caa228d 100644 --- a/tests/types/test_chat.py +++ b/tests/types/test_chat.py @@ -13,7 +13,7 @@ def test_export(): def test_id(): assert isinstance(chat.id, int) assert chat.id == CHAT['id'] - assert hash(chat) == CHAT['id'] + # assert hash(chat) == CHAT['id'] def test_name(): diff --git a/tests/types/test_game.py b/tests/types/test_game.py index c81809f3..9a051160 100644 --- a/tests/types/test_game.py +++ b/tests/types/test_game.py @@ -3,6 +3,7 @@ from .dataset import GAME game = types.Game(**GAME) + def test_export(): exported = game.to_python() assert isinstance(exported, dict) diff --git a/tests/types/test_message.py b/tests/types/test_message.py index 8071207e..8751d064 100644 --- a/tests/types/test_message.py +++ b/tests/types/test_message.py @@ -13,7 +13,7 @@ def test_export(): def test_message_id(): - assert hash(message) == MESSAGE['message_id'] + # assert hash(message) == MESSAGE['message_id'] assert message.message_id == MESSAGE['message_id'] assert message['message_id'] == MESSAGE['message_id'] diff --git a/tests/types/test_update.py b/tests/types/test_update.py index 72b97571..6b724a23 100644 --- a/tests/types/test_update.py +++ b/tests/types/test_update.py @@ -12,7 +12,7 @@ def test_export(): def test_update_id(): assert isinstance(update.update_id, int) - assert hash(update) == UPDATE['update_id'] + # assert hash(update) == UPDATE['update_id'] assert update.update_id == UPDATE['update_id'] diff --git a/tests/types/test_user.py b/tests/types/test_user.py index ae8413aa..585e6fc0 100644 --- a/tests/types/test_user.py +++ b/tests/types/test_user.py @@ -15,7 +15,7 @@ def test_export(): def test_id(): assert isinstance(user.id, int) assert user.id == USER['id'] - assert hash(user) == USER['id'] + # assert hash(user) == USER['id'] def test_bot(): @@ -40,7 +40,7 @@ def test_full_name(): def test_mention(): assert user.mention == f"@{USER['username']}" - assert user.get_mention('foo') == f"[foo](tg://user?id={USER['id']})" + assert user.get_mention('foo', as_html=False) == f"[foo](tg://user?id={USER['id']})" assert user.get_mention('foo', as_html=True) == f"foo"