Skip to content

Commit be544d7

Browse files
committed
Adjust test condition to look only for engine related warning
1 parent b93a715 commit be544d7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/test_service.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ def test_announce_to_reachable_engine(caplog: pytest.LogCaptureFixture, app_with
111111
warning_logs_found = False
112112
for record in caplog.records:
113113
if record.levelname == "WARNING":
114-
warning_logs_found = True
115-
break
114+
if "Failed to notify the engine" in record.message:
115+
warning_logs_found = True
116+
break
116117

117118
assert not warning_logs_found
118119

@@ -130,8 +131,9 @@ def test_announce_to_unreachable_engine(caplog: pytest.LogCaptureFixture, app_wi
130131
warning_logs_found = False
131132
for record in caplog.records:
132133
if record.levelname == "WARNING":
133-
warning_logs_found = True
134-
break
134+
if "Failed to notify the engine" in record.message:
135+
warning_logs_found = True
136+
break
135137

136138
assert warning_logs_found
137139

0 commit comments

Comments
 (0)