Owen-CH-Leung commented on code in PR #41871:
URL: https://github.com/apache/airflow/pull/41871#discussion_r1738826990
##########
airflow/providers/elasticsearch/hooks/elasticsearch.py:
##########
@@ -34,6 +34,9 @@
from airflow.models.connection import Connection as AirflowConnection
+if "pytest" in sys.modules:
+ import elasticsearch # noqa: F401
Review Comment:
Thanks. Yes indeed this doesn't look good. I was doing it originally for
unittest patch to be easier.
I've removed it and rewrite the test to patch on
`elasticsearch.Elasticsearch` directly.
--
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]