From 2484668b263d8fb8908ffa1d8133f62d18650922 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Tue, 13 Aug 2024 00:16:26 -0500 Subject: [PATCH] checking for error log lines during startup test --- src/ad_test/test_startup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ad_test/test_startup.py b/src/ad_test/test_startup.py index 7fd1399..12cb876 100644 --- a/src/ad_test/test_startup.py +++ b/src/ad_test/test_startup.py @@ -41,6 +41,8 @@ def test_startup(ad: AppDaemon, caplog: pytest.LogCaptureFixture): with caplog.at_level(logging.DEBUG): ad.loop.run_until_complete(asyncio.sleep(2.0)) + error_log_lines = [msg for name, lvl, msg in caplog.record_tuples if name.startswith('Error')] + assert len(error_log_lines) == 0 assert "Started 'hello_world'" in caplog.text assert 'App initialization complete' in caplog.text