How to use the emoji.models.Emoji.name_for function in emoji

To help you get started, we’ve selected a few emoji examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gaqzi / django-emoji / emoji / tests.py View on Github external
def test_emojis_that_were_showing_wrong(self):
        # These emojis were showing other images than the ones intended.
        emoji = '🍆'
        self.assertEqual(Emoji.name_for(emoji), 'eggplant')

        emoji = '😘'
        self.assertEqual(Emoji.name_for(emoji), 'kissing_heart')
github gaqzi / django-emoji / emoji / tests.py View on Github external
def test_should_be_able_to_look_up_unicode(self):
        self.assertEqual(Emoji.name_for(self.UNICODE_KISS), 'kiss')
        self.assertEqual(Emoji.name_for(self.UNICODE_KISS_CHARACTER), 'kiss')
github gaqzi / django-emoji / emoji / tests.py View on Github external
def test_remove_unicode_control_from_name_for(self):
        # fe0f is a control character that modifies the character
        # before, but we already do that modification so it's just
        # unecessary.
        emoji = '✌️'
        self.assertEqual(Emoji.name_for(emoji), 'v')
github gaqzi / django-emoji / emoji / tests.py View on Github external
def test_emojis_that_were_showing_wrong(self):
        # These emojis were showing other images than the ones intended.
        emoji = '🍆'
        self.assertEqual(Emoji.name_for(emoji), 'eggplant')

        emoji = '😘'
        self.assertEqual(Emoji.name_for(emoji), 'kissing_heart')
github gaqzi / django-emoji / emoji / tests.py View on Github external
def test_should_be_able_to_look_up_unicode(self):
        self.assertEqual(Emoji.name_for(self.UNICODE_KISS), 'kiss')
        self.assertEqual(Emoji.name_for(self.UNICODE_KISS_CHARACTER), 'kiss')