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 24db9c9 commit e782366
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 @@ -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

Expand All @@ -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

Expand Down

0 comments on commit e782366

Please sign in to comment.