'This is also tested by a client test, but here we can verify
the cache against the database'

def test_save_message(self):

    self.login(self.example_email('hamlet'))
    msg_id = self.send_message(self.example_email('hamlet'), 'Scotland', Recipient.STREAM, subject='editing', content='before    edit')
    result = self.client_patch(('/json/messages/' + str(msg_id)), {'message_id': msg_id, 'content': 'after    edit'})
    self.assert_json_success(result)
    self.check_message(msg_id, content='after    edit')
    result = self.client_patch(('/json/messages/' + str(msg_id)), {'message_id': msg_id, 'subject': 'edited'})
    self.assert_json_success(result)
    self.check_message(msg_id, subject='edited')
