yesemsanthoshkumar commented on a change in pull request #10343:
URL: https://github.com/apache/airflow/pull/10343#discussion_r471624064
##########
File path: tests/providers/google/cloud/operators/test_dataproc.py
##########
@@ -419,6 +428,24 @@ def test_execute(self, mock_hook):
class TestDataprocSubmitJobOperator(unittest.TestCase):
+
+ def setUp(self):
+ self.dagbag = DagBag(
+ dag_folder='/dev/null', include_examples=False
+ )
+ self.dag = DAG(TEST_DAG_ID, default_args={
+ 'owner': 'airflow',
+ 'start_date': DEFAULT_DATE
+ })
+ self.mock_context = MagicMock()
+
+ def tearDown(self):
+ session = Session()
+ session.query(TaskInstance).filter_by(
+ dag_id=TEST_DAG_ID).delete()
+ session.commit()
+ session.close()
Review comment:
Have made those changes. One question though, I've added the tests in
DataProcSubmiSparkOperator(DataprocJobBaseOperator). Should I add the tests for
other subclass operators as well?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]