'Tests updating the realm property \'allow_message_editing\'.'

def test_update_realm_allow_message_editing(self):

    self.set_up_db('allow_message_editing', False)
    self.set_up_db('message_content_edit_limit_seconds', 0)
    realm = self.update_with_api('allow_message_editing', True)
    realm = self.update_with_api('message_content_edit_limit_seconds', 100)
    self.assertEqual(realm.allow_message_editing, True)
    self.assertEqual(realm.message_content_edit_limit_seconds, 100)
    realm = self.update_with_api('allow_message_editing', False)
    self.assertEqual(realm.allow_message_editing, False)
    self.assertEqual(realm.message_content_edit_limit_seconds, 100)
    realm = self.update_with_api('message_content_edit_limit_seconds', 200)
    self.assertEqual(realm.allow_message_editing, False)
    self.assertEqual(realm.message_content_edit_limit_seconds, 200)
