mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
test_runner: Move bounce_key_prefix_for_testing to ZulipTestCase.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
768e8ccc55
commit
e40cdc6c2c
@@ -32,7 +32,9 @@ from zerver.lib.actions import (
|
||||
check_send_stream_message,
|
||||
gather_subscriptions,
|
||||
)
|
||||
from zerver.lib.cache import bounce_key_prefix_for_testing
|
||||
from zerver.lib.initial_password import initial_password
|
||||
from zerver.lib.rate_limiter import bounce_redis_key_prefix_for_testing
|
||||
from zerver.lib.sessions import get_session_dict_user
|
||||
from zerver.lib.stream_subscription import get_stream_subscriptions_for_user
|
||||
from zerver.lib.streams import (
|
||||
@@ -93,6 +95,10 @@ class ZulipTestCase(TestCase):
|
||||
super().setUp()
|
||||
self.API_KEYS: Dict[str, str] = {}
|
||||
|
||||
test_name = self.id()
|
||||
bounce_key_prefix_for_testing(test_name)
|
||||
bounce_redis_key_prefix_for_testing(test_name)
|
||||
|
||||
def tearDown(self) -> None:
|
||||
super().tearDown()
|
||||
# Important: we need to clear event queues to avoid leaking data to future tests.
|
||||
|
||||
Reference in New Issue
Block a user