dabla commented on code in PR #37937:
URL: https://github.com/apache/airflow/pull/37937#discussion_r1514614748
##########
tests/models/test_baseoperatormeta.py:
##########
@@ -0,0 +1,64 @@
+import os
+from typing import Any
+from unittest import TestCase
+from unittest.mock import Mock, patch, MagicMock
+
+import pendulum
+from sqlalchemy.orm import Session
+
+from airflow import AirflowException, DAG
+from airflow.models import TaskInstance, DagRun
+from airflow.models.baseoperator import BaseOperator
+from airflow.utils.context import Context
+from airflow.utils.state import DagRunState
+
+
+class HelloWorldOperator(BaseOperator):
+ called = False
+
+ def execute(self, context: Context) -> Any:
+ HelloWorldOperator.called = True
+ return f"Hello {self.owner}!"
+
+
+class IterableSession(Session):
+ def __next__(self):
+ pass
+
+
+class BaseOperatorMetaTestCase(TestCase):
Review Comment:
Thanks for all the suggestions I will try to apply all of those as best as
possible
--
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]