diff --git a/tests/test_service.py b/tests/test_service.py index c10e990..bab1ac8 100644 --- a/tests/test_service.py +++ b/tests/test_service.py @@ -113,8 +113,9 @@ def test_announce_to_reachable_engine( warning_logs_found = False for record in caplog.records: if record.levelname == "WARNING": - warning_logs_found = True - break + if "Failed to notify the engine" in record.message: + warning_logs_found = True + break assert not warning_logs_found @@ -134,8 +135,9 @@ def test_announce_to_unreachable_engine( warning_logs_found = False for record in caplog.records: if record.levelname == "WARNING": - warning_logs_found = True - break + if "Failed to notify the engine" in record.message: + warning_logs_found = True + break assert warning_logs_found