Lee-W commented on code in PR #74626:
URL: https://github.com/apache/airflow/pull/74626#discussion_r4262230374
##########
providers/common/ai/tests/unit/common/ai/hooks/test_pydantic_ai.py:
##########
@@ -333,10 +350,21 @@ def registry():
# argument -- without it, `conn.get_hook()` calls the mock with zero
arguments and
# `reg.get_hook` would have no way to know which connection dispatched
it.
patch.object(Connection, "get_hook", side_effect=reg.get_hook,
autospec=True),
+ patch(
+
"airflow.providers.common.ai.hooks.pydantic_ai._get_registered_hooks",
Review Comment:
Added `test_registers_the_pydanticai_hook_without_patching_the_registry`,
which runs the real `_get_registered_hooks` and asserts the `pydanticai` entry
points at `PydanticAIHook`.
--
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]