'The main complicated thing about setting realm names is fighting the
cache, and we start by populating the cache for Hamlet, and we end
by checking the cache to ensure that the new value is there.'

def test_do_set_realm_name_caching(self):

    self.example_user('hamlet')
    realm = get_realm('zulip')
    new_name = u'Zed    You    Elle    Eye    Pea'
    do_set_realm_property(realm, 'name', new_name)
    self.assertEqual(get_realm(realm.string_id).name, new_name)
    self.assert_user_profile_cache_gets_new_name(self.example_user('hamlet'), new_name)
