Merge "py36: Fix test_get_logger_sysloghandler_plumbing"

This commit is contained in:
Zuul
2018年06月22日 11:48:38 +00:00
committed by Gerrit Code Review

View File

@@ -1605,8 +1605,16 @@ class TestUtils(unittest.TestCase):
syslog_handler_catcher.LOG_LOCAL0 = orig_sysloghandler.LOG_LOCAL0
syslog_handler_catcher.LOG_LOCAL3 = orig_sysloghandler.LOG_LOCAL3
# Some versions of python perform host resolution while initializing
# the handler. See https://bugs.python.org/issue30378
orig_getaddrinfo = socket.getaddrinfo
def fake_getaddrinfo(host, *args):
return orig_getaddrinfo('localhost', *args)
with mock.patch.object(utils, 'ThreadSafeSysLogHandler',
syslog_handler_catcher):
syslog_handler_catcher), \
mock.patch.object(socket, 'getaddrinfo', fake_getaddrinfo):
utils.get_logger({
'log_facility': 'LOG_LOCAL3',
}, 'server', log_route='server')
Reference in New Issue
openstack/swift
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.