From 7d33b0a259d25454757ee6c0b2ad15e2e474dd7e Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 10 Jul 2019 12:17:10 -0700 Subject: [PATCH] Fix broken test in Python 3.7 (#25067) --- tests/util/test_logging.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/util/test_logging.py b/tests/util/test_logging.py index 92a06587fda..84549b62530 100644 --- a/tests/util/test_logging.py +++ b/tests/util/test_logging.py @@ -21,7 +21,7 @@ def test_sensitive_data_filter(): @asyncio.coroutine def test_async_handler_loop_log(loop): - """Test the logging sensitive data filter.""" + """Test logging data inside from inside the event loop.""" loop._thread_ident = threading.get_ident() queue = asyncio.Queue(loop=loop) @@ -40,13 +40,13 @@ def test_async_handler_loop_log(loop): log_record = logging.makeLogRecord({'msg': "Test Log Record"}) handler.emit(log_record) yield from handler.async_close(True) - assert queue.get_nowait() == log_record + assert queue.get_nowait().msg == "Test Log Record" assert queue.empty() @asyncio.coroutine def test_async_handler_thread_log(loop): - """Test the logging sensitive data filter.""" + """Test logging data from a thread.""" loop._thread_ident = threading.get_ident() queue = asyncio.Queue(loop=loop) @@ -63,7 +63,7 @@ def test_async_handler_thread_log(loop): yield from loop.run_in_executor(None, add_log) yield from handler.async_close(True) - assert queue.get_nowait() == log_record + assert queue.get_nowait().msg == "Test Log Record" assert queue.empty()