Remove stub() test helper.

This commit is contained in:
Steve Howell
2016-07-27 13:09:33 -07:00
committed by Tim Abbott
parent ec6c9ba436
commit 51bae8abc4
2 changed files with 5 additions and 12 deletions

View File

@@ -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]