sdaberdaku commented on code in PR #75764:
URL: https://github.com/apache/airflow/pull/75764#discussion_r4411873058


##########
providers/apache/spark/tests/unit/apache/spark/decorators/test_pyspark.py:
##########
@@ -118,6 +118,24 @@ def f(spark):
 
         spark_mock.builder.config.assert_called_once_with(conf=conf_mock())
 
+    @pytest.mark.db_test
+    @mock.patch("pyspark.SparkConf")
+    @mock.patch("pyspark.sql.SparkSession")
+    def test_pyspark_decorator_renders_config_kwargs(self, spark_mock, 
conf_mock, dag_maker):

Review Comment:
   Added. `test_pyspark_decorator_renders_template_fields` now also passes 
`conn_id="spark-{{ 'connect' }}"` and asserts `spark.remote == 
"sc://localhost"`. Verified it fails with `AirflowNotFoundException` for the 
unrendered conn_id when `conn_id` is dropped from `template_fields`. Squashed 
into the existing commit.



-- 
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]

Reply via email to