diff --git a/zerver/tests/test_presence.py b/zerver/tests/test_presence.py index c16ceed211..7864622628 100644 --- a/zerver/tests/test_presence.py +++ b/zerver/tests/test_presence.py @@ -23,6 +23,7 @@ from zerver.models import ( UserActivity, UserProfile, UserPresence, + flush_per_request_caches, ) import datetime @@ -44,10 +45,11 @@ class ActivityTest(ZulipTestCase): count=count, last_visit=last_visit ) + flush_per_request_caches() with queries_captured() as queries: self.client_get('/activity') - self.assert_max_length(queries, 13) + self.assert_length(queries, 2) class TestClientModel(ZulipTestCase): def test_client_stringification(self):