Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
bots: Pass realm to get_system_bot calls in test_cache.py.
Mateusz Manderaf790a32d136f
diff --git a/zerver/tests/test_cache.py b/zerver/tests/test_cache.pyindex 10b90933bd0..955b60ebb77 100644--- a/zerver/tests/test_cache.py+++ b/zerver/tests/test_cache.py@@ -263,7 +263,7 @@ class BotCacheKeyTest(ZulipTestCase):realm = get_realm(settings.SYSTEM_BOT_REALM)# Get the profile cached on both cache keys:user_profile = get_user(settings.EMAIL_GATEWAY_BOT, realm)- bot_profile = get_system_bot(settings.EMAIL_GATEWAY_BOT)+ bot_profile = get_system_bot(settings.EMAIL_GATEWAY_BOT, realm.id)self.assertEqual(user_profile, bot_profile)# Flip the setting and save:@@ -273,7 +273,7 @@ class BotCacheKeyTest(ZulipTestCase):# The .save() should have deleted cache keys, so if we fetch again,# the returned objects should have can_forge_sender set correctly.- bot_profile2 = get_system_bot(settings.EMAIL_GATEWAY_BOT)+ bot_profile2 = get_system_bot(settings.EMAIL_GATEWAY_BOT, realm.id)self.assertEqual(bot_profile2.can_forge_sender, flipped_setting)user_profile2 = get_user(settings.EMAIL_GATEWAY_BOT, realm)