shubhamraj-git commented on code in PR #73419:
URL: https://github.com/apache/airflow/pull/73419#discussion_r4068809199
##########
providers/ssh/tests/unit/ssh/hooks/test_ssh_async.py:
##########
@@ -71,6 +73,39 @@ def test_parse_extras_no_host_key_check(self):
hook._parse_extras(mock_conn)
assert hook.known_hosts == "none"
+ def test_parse_extras_no_host_key_check_defaults_to_false(self):
+ """A connection that omits ``no_host_key_check`` keeps host key
verification enabled."""
+ hook = SSHHookAsync(ssh_conn_id="test_conn")
+ mock_conn = mock.MagicMock()
Review Comment:
The three newly added async SSH tests use unrestricted `MagicMock`
connection objects. Airflow's review rules require `spec` or `autospec`,
because unrestricted mocks accept misspelled and nonexistent attributes. Could
these use a real `Connection`, `mock.create_autospec(Connection,
instance=True)`, or a small typed test object? No additional behavior test is
needed; this is a correction to the test doubles themselves.
---
Drafted-by: Codex (GPT-5); reviewed by @shubhamraj-git before posting
--
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]