'Sending a message with a topic longer than the maximum topic length
succeeds, but the topic is truncated.'

def test_long_topic(self):

    self.login(self.example_email('hamlet'))
    long_topic = ('A' * (MAX_SUBJECT_LENGTH + 1))
    post_data = {'type': 'stream', 'to': 'Verona', 'client': 'test    suite', 'content': 'test    content', 'subject': long_topic}
    result = self.client_post('/json/messages', post_data)
    self.assert_json_success(result)
    sent_message = self.get_last_message()
    self.assertEqual(sent_message.topic_name(), (('A' * (MAX_SUBJECT_LENGTH - 3)) + '...'))
