Skip to content

Commit

Permalink
Adjust test condition to look only for engine related warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarquis committed Apr 12, 2024
1 parent d3d9a83 commit ceb5b0d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ def test_announce_to_reachable_engine(caplog: pytest.LogCaptureFixture, app_with
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

Expand All @@ -130,8 +131,9 @@ def test_announce_to_unreachable_engine(caplog: pytest.LogCaptureFixture, app_wi
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

Expand Down

0 comments on commit ceb5b0d

Please sign in to comment.