# -*- coding: utf-8; -*- from __future__ import unicode_literals from emojipy import Emoji from unittest import TestCase class SpriteTest(TestCase): def setUp(self): self.emoji = Emoji self.emoji.sprites = True self.emoji.image_type = 'png' self.emoji.unicode_alt = True def test_unicode_to_image(self): """ Test 'unicode_to_image' method with 'sprites' enabled """ text = 'Hello world! 😄 :smile:' expected = 'Hello world! 😄 :smile:' self.assertEqual(self.emoji.unicode_to_image(text), expected)