diff --git a/zerver/lib/message.py b/zerver/lib/message.py index f9e98a25d3..8041f4b222 100644 --- a/zerver/lib/message.py +++ b/zerver/lib/message.py @@ -16,7 +16,7 @@ from zerver.lib.cache import ( generic_bulk_cached_fetch, to_dict_cache_key, to_dict_cache_key_id, - cache_get, cache_set, + cache_set, ) from zerver.lib.request import JsonableError from zerver.lib.stream_subscription import ( diff --git a/zerver/tests/test_messages.py b/zerver/tests/test_messages.py index dc9a7f272e..364865149f 100644 --- a/zerver/tests/test_messages.py +++ b/zerver/tests/test_messages.py @@ -4132,7 +4132,6 @@ class MessageVisibilityTest(ZulipTestCase): RealmCount.objects.create(realm=realm, property=stat.property, end_time=end_time, value=5) - with mock.patch('zerver.lib.message.cache_get', return_value=True), \ - mock.patch("zerver.lib.message.update_first_visible_message_id") as m: + with mock.patch("zerver.lib.message.update_first_visible_message_id") as m: maybe_update_first_visible_message_id(realm, lookback_hours) m.assert_called_once_with(realm)