diff --git a/zerver/tests/test_subs.py b/zerver/tests/test_subs.py index 9e00647d2d..d443e0e335 100644 --- a/zerver/tests/test_subs.py +++ b/zerver/tests/test_subs.py @@ -10,7 +10,6 @@ from django.http import HttpResponse from django.utils.timezone import now as timezone_now from zerver.decorator import JsonableError -from zerver.lib import cache from zerver.lib.actions import ( bulk_add_subscriptions, bulk_get_subscriber_user_ids, @@ -3013,9 +3012,6 @@ class SubscriptionAPITest(ZulipTestCase): self.test_realm.notifications_stream_id = notifications_stream.id self.test_realm.save() - # Delete the UserProfile from the cache so the realm change will be - # picked up - cache.cache_delete(cache.user_profile_by_email_cache_key(self.test_email)) with tornado_redirected_to_list(events): self.helper_check_subs_before_and_after_add( self.streams + add_streams, @@ -3066,10 +3062,6 @@ class SubscriptionAPITest(ZulipTestCase): self.test_realm.notifications_stream_id = notifications_stream.id self.test_realm.save() - # Delete the UserProfile from the cache so the realm change will be - # picked up - cache.cache_delete(cache.user_profile_by_email_cache_key(invitee.email)) - self.common_subscribe_to_streams( invitee, invite_streams, @@ -3104,10 +3096,6 @@ class SubscriptionAPITest(ZulipTestCase): user.realm = realm user.save() - # Delete the UserProfile from the cache so the realm change will be - # picked up - cache.cache_delete(cache.user_profile_by_email_cache_key(user.email)) - self.common_subscribe_to_streams( user, invite_streams,