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

def test_long_message(self):

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