mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
tests: Move simulated_queue_client to the only test it is used in.
This commit is contained in:
committed by
Tim Abbott
parent
64268f47e8
commit
d1822b5630
@@ -60,7 +60,6 @@ from zerver.models import (
|
||||
get_stream,
|
||||
)
|
||||
from zerver.tornado.handlers import AsyncDjangoHandler, allocate_handler_id
|
||||
from zerver.worker import queue_processors
|
||||
from zilencer.models import RemoteZulipServer
|
||||
from zproject.backends import ExternalAuthDataDict, ExternalAuthResult
|
||||
|
||||
@@ -92,12 +91,6 @@ def stub_event_queue_user_events(
|
||||
yield
|
||||
|
||||
|
||||
@contextmanager
|
||||
def simulated_queue_client(client: Callable[[], object]) -> Iterator[None]:
|
||||
with mock.patch.object(queue_processors, "SimpleQueueClient", client):
|
||||
yield
|
||||
|
||||
|
||||
@contextmanager
|
||||
def cache_tries_captured() -> Iterator[List[Tuple[str, Union[str, List[str]], Optional[str]]]]:
|
||||
cache_queries: List[Tuple[str, Union[str, List[str]], Optional[str]]] = []
|
||||
|
||||
Reference in New Issue
Block a user