Fix flapping system log test (#78391)

Since we run tests with asyncio debug on, there is
a chance we will get an asyncio log message instead
of the one we want

Fixes https://github.com/home-assistant/core/actions/runs/3045080236/jobs/4906717578
This commit is contained in:
J. Nick Koston 2022-09-13 22:10:50 +02:00 committed by GitHub
parent 02c9541862
commit bf852812bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ def find_log(logs, level):
if not isinstance(level, tuple):
level = (level,)
log = next(
(log for log in logs if log["level"] in level),
(log for log in logs if log["level"] in level and log["name"] != "asyncio"),
None,
)
assert log is not None