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 0891450 commit 2d7d006
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ def test_announce_to_reachable_engine(
# passes.
warning_logs_found = False
# for record in caplog.records:
# if record.levelname == "WARNING":
# warning_logs_found = True
# break
# if record.levelname == "WARNING":
# 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 2d7d006

Please sign in to comment.