From 4e0a79d1466519905da45e5301e38985030d6f3b Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 2 Feb 2019 15:15:24 -0800 Subject: [PATCH] =?UTF-8?q?test=5Fmessages:=20Don=E2=80=99t=20mock=20an=20?= =?UTF-8?q?unused=20import.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since 8a1794caa34cc1775794a342e9e1d8820e9d6091, we don't do any caching in that system. Signed-off-by: Anders Kaseorg --- zerver/lib/message.py | 2 +- zerver/tests/test_messages.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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)