Merge "Mock SysLogHandler for proxy/test_server.py"

This commit is contained in:
Jenkins 2013-05-31 19:22:39 +00:00 committed by Gerrit Code Review
commit 6377f6e075

View File

@ -77,7 +77,9 @@ def request_del(self):
def setup():
utils.HASH_PATH_SUFFIX = 'endcap'
global _testdir, _test_servers, _test_sockets, \
_orig_container_listing_limit, _test_coros
_orig_container_listing_limit, _test_coros, _orig_SysLogHandler
_orig_SysLogHandler = utils.SysLogHandler
utils.SysLogHandler = mock.MagicMock()
Request._orig_init = Request.__init__
Request.__init__ = request_init
Request._orig_del = getattr(Request, '__del__', None)
@ -179,6 +181,7 @@ def teardown():
Request.__init__ = Request._orig_init
if Request._orig_del:
Request.__del__ = Request._orig_del
utils.SysLogHandler = _orig_SysLogHandler
def sortHeaderNames(headerNames):