diff --git a/tests/test_sticker.py b/tests/test_sticker.py index 72edbcd1d..f1b55c507 100644 --- a/tests/test_sticker.py +++ b/tests/test_sticker.py @@ -23,7 +23,7 @@ import unittest import os from flaky import flaky -from future.utils import text_to_native_str +from future.utils import PY2 sys.path.append('.') @@ -71,7 +71,10 @@ class StickerTest(BaseTest, unittest.TestCase): self.assertEqual(sticker.width, self.width) self.assertEqual(sticker.height, self.height) self.assertTrue(isinstance(sticker.thumb, telegram.PhotoSize)) - self.assertEqual(sticker.emoji, text_to_native_str(self.emoji)) + if PY2: + self.assertEqual(sticker.emoji, self.emoji.decode('utf-8')) + else: + self.assertEqual(sticker.emoji, self.emoji) self.assertEqual(sticker.file_size, self.file_size) def test_sticker_de_json(self):