mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
Remove stub() test helper.
This commit is contained in:
@@ -59,14 +59,6 @@ API_KEYS = {} # type: Dict[text_type, text_type]
|
||||
|
||||
skip_py3 = unittest.skipIf(six.PY3, "Expected failure on Python 3")
|
||||
|
||||
@contextmanager
|
||||
def stub(obj, name, f):
|
||||
# type: (Any, str, Callable[..., Any]) -> Generator[None, None, None]
|
||||
old_f = getattr(obj, name)
|
||||
setattr(obj, name, f)
|
||||
yield
|
||||
setattr(obj, name, old_f)
|
||||
|
||||
@contextmanager
|
||||
def simulated_queue_client(client):
|
||||
# type: (type) -> Generator[None, None, None]
|
||||
|
||||
Reference in New Issue
Block a user