mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
tests: Flush per-request caches automatically for query counts.
This commit is contained in:
@@ -56,6 +56,7 @@ from zerver.models import (
|
||||
Subscription,
|
||||
UserMessage,
|
||||
UserProfile,
|
||||
flush_per_request_caches,
|
||||
get_client,
|
||||
get_realm,
|
||||
get_stream,
|
||||
@@ -181,6 +182,7 @@ def queries_captured(
|
||||
if not keep_cache_warm:
|
||||
cache = get_cache_backend(None)
|
||||
cache.clear()
|
||||
flush_per_request_caches()
|
||||
with mock.patch.multiple(
|
||||
TimeTrackingCursor, execute=cursor_execute, executemany=cursor_executemany
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user