tests: Add test_stream_message_unicode().

This commit is contained in:
Steve Howell 2016-09-23 15:08:15 -07:00 committed by Tim Abbott
parent 5486e539fd
commit 98a500d46f
1 changed files with 11 additions and 0 deletions

View File

@ -348,6 +348,17 @@ class StreamMessagesTest(ZulipTestCase):
self.assert_length(queries, 7)
def test_stream_message_unicode(self):
# type: () -> None
user_profile = get_user_profile_by_email("iago@zulip.com")
self.subscribe_to_stream(user_profile.email, "Denmark")
self.send_message("hamlet@zulip.com", "Denmark", Recipient.STREAM,
content="whatever", subject="my topic")
message = most_recent_message(user_profile)
self.assertEqual(str(message),
u'<Message: Denmark / my topic / '
'<UserProfile: hamlet@zulip.com <Realm: zulip.com 1>>>')
def test_message_mentions(self):
# type: () -> None
user_profile = get_user_profile_by_email("iago@zulip.com")