mirror of
https://github.com/Electric-Special/ha-core.git
synced 2026-03-21 07:05:48 +01:00
Fix broken test in Python 3.7 (#25067)
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user