Taragolis commented on code in PR #38518:
URL: https://github.com/apache/airflow/pull/38518#discussion_r1540205185
##########
tests/providers/sftp/triggers/test_sftp.py:
##########
@@ -175,13 +175,10 @@ async def
test_sftp_trigger_run_trigger_failure_state(self, mock_get_files_by_pa
trigger = SFTPTrigger(path="test/path/", sftp_conn_id="sftp_default",
file_pattern="my_test_file")
- expected_event = {"status": "failure", "message": "An unexpected
exception"}
-
- with pytest.raises(Exception):
- generator = trigger.run()
- actual_event = await generator.asend(None)
+ generator = trigger.run()
+ actual_event = await generator.asend(None)
Review Comment:
I guess this test "worked" because `pytest.raises(Exception)` catch
assertion error from `assert TriggerEvent(expected_event) == actual_event` 🙄
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]