tests: Flush per-request caches automatically for query counts.

This commit is contained in:
Steve Howell
2023-08-11 14:40:06 +00:00
committed by Tim Abbott
parent 730ae61ce5
commit 751b8b5bb5
9 changed files with 15 additions and 33 deletions

View File

@@ -77,7 +77,6 @@ from zerver.models import (
Subscription,
UserMessage,
UserProfile,
flush_per_request_caches,
get_realm,
get_stream,
get_system_bot,
@@ -923,8 +922,7 @@ class LoginTest(ZulipTestCase):
content="test message",
)
# Clear all the caches.
flush_per_request_caches()
# Clear the ContentType cache.
ContentType.objects.clear_cache()
# Ensure the number of queries we make is not O(streams)