potiuk commented on code in PR #68533:
URL: https://github.com/apache/airflow/pull/68533#discussion_r3411252172


##########
providers/standard/tests/unit/standard/operators/test_python.py:
##########
@@ -1072,8 +1085,9 @@ def test_context(self):
         def f(templates_dict):
             return templates_dict["ds"]
 
-        task = self.run_as_task(f, templates_dict={"ds": "{{ ds }}"})
-        assert task.templates_dict == {"ds": self.ds_templated}
+        # the callable receives (and returns) the rendered templates_dict value
+        ti = self.run_as_task(f, return_ti=True, templates_dict={"ds": "{{ ds 
}}"})
+        assert self._pull_xcom(ti) == self.ds_templated

Review Comment:
   Because when we use mocked *operations to db we cannot **realy** resolve the 
templates. That was one of the changes needed to mock those.



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