emoji: Finish removing leftover code from banned Emoji sets.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2019-09-18 13:33:00 -07:00 committed by Tim Abbott
parent cf5d3a3ef3
commit fc0554fcb8
5 changed files with 7 additions and 15 deletions

View File

@ -6,7 +6,7 @@ from collections import defaultdict
from typing import Any, Dict, List from typing import Any, Dict, List
# Emojisets that we currently support. # Emojisets that we currently support.
EMOJISETS = ['apple', 'emojione', 'google', 'twitter'] EMOJISETS = ['google', 'twitter']
# Some image files in the old emoji farm had a different name than in the new emoji # Some image files in the old emoji farm had a different name than in the new emoji
# farm. `remapped_emojis` is a map that contains a mapping of their name in the old # farm. `remapped_emojis` is a map that contains a mapping of their name in the old

View File

@ -102,14 +102,6 @@ TABLE_CSS = """
background-image: url('sheet-google-64.png') !important; background-image: url('sheet-google-64.png') !important;
} }
.apple {
background-image: url('sheet-apple-64.png') !important;
}
.emojione {
background-image: url('sheet-emojione-64.png') !important;
}
.twitter { .twitter {
background-image: url('sheet-twitter-64.png') !important; background-image: url('sheet-twitter-64.png') !important;
} }

View File

@ -676,12 +676,12 @@ class TestMissedMessages(ZulipTestCase):
mock_random_token.side_effect = tokens mock_random_token.side_effect = tokens
hamlet = self.example_user('hamlet') hamlet = self.example_user('hamlet')
hamlet.emojiset = 'apple' hamlet.emojiset = 'twitter'
hamlet.save(update_fields=['emojiset']) hamlet.save(update_fields=['emojiset'])
msg_id = self.send_personal_message( msg_id = self.send_personal_message(
self.example_email('othello'), self.example_email('hamlet'), self.example_email('othello'), self.example_email('hamlet'),
'Extremely personal message with a hamburger :hamburger:!') 'Extremely personal message with a hamburger :hamburger:!')
body = '<img alt=":hamburger:" src="http://zulip.testserver/static/generated/emoji/images-apple-64/1f354.png" title="hamburger" style="height: 20px;">' body = '<img alt=":hamburger:" src="http://zulip.testserver/static/generated/emoji/images-twitter-64/1f354.png" title="hamburger" style="height: 20px;">'
email_subject = 'PMs with Othello, the Moor of Venice' email_subject = 'PMs with Othello, the Moor of Venice'
self._test_cases(tokens, msg_id, body, email_subject, send_as_user=False, verify_html_body=True) self._test_cases(tokens, msg_id, body, email_subject, send_as_user=False, verify_html_body=True)

View File

@ -1808,7 +1808,7 @@ class EventsRegisterTest(ZulipTestCase):
"""Test updating each setting in UserProfile.property_types dict.""" """Test updating each setting in UserProfile.property_types dict."""
test_changes = dict( test_changes = dict(
emojiset = [u'apple', u'twitter'], emojiset = [u'twitter'],
default_language = [u'es', u'de', u'en'], default_language = [u'es', u'de', u'en'],
timezone = [u'US/Mountain', u'US/Samoa', u'Pacific/Galapogos', u''], timezone = [u'US/Mountain', u'US/Samoa', u'Pacific/Galapogos', u''],
demote_inactive_streams = [2, 3, 1], demote_inactive_streams = [2, 3, 1],

View File

@ -788,7 +788,7 @@ class UserProfileTest(ZulipTestCase):
hamlet = self.example_user("hamlet") hamlet = self.example_user("hamlet")
cordelia.default_language = "de" cordelia.default_language = "de"
cordelia.emojiset = "apple" cordelia.emojiset = "twitter"
cordelia.timezone = "America/Phoenix" cordelia.timezone = "America/Phoenix"
cordelia.night_mode = True cordelia.night_mode = True
cordelia.enable_offline_email_notifications = False cordelia.enable_offline_email_notifications = False
@ -813,8 +813,8 @@ class UserProfileTest(ZulipTestCase):
self.assertEqual(cordelia.default_language, "de") self.assertEqual(cordelia.default_language, "de")
self.assertEqual(hamlet.default_language, "en") self.assertEqual(hamlet.default_language, "en")
self.assertEqual(iago.emojiset, "apple") self.assertEqual(iago.emojiset, "twitter")
self.assertEqual(cordelia.emojiset, "apple") self.assertEqual(cordelia.emojiset, "twitter")
self.assertEqual(hamlet.emojiset, "google-blob") self.assertEqual(hamlet.emojiset, "google-blob")
self.assertEqual(iago.timezone, "America/Phoenix") self.assertEqual(iago.timezone, "America/Phoenix")