SameerMesiah97 commented on code in PR #74973:
URL: https://github.com/apache/airflow/pull/74973#discussion_r4307499327
##########
task-sdk/tests/task_sdk/bases/test_notifier.py:
##########
@@ -97,3 +97,35 @@ def test_notifier_call_with_prepared_context(self, caplog):
}
)
assert notifier.message == "task: some_task"
+
+ def test_render_template_fields_with_dag_without_get_template_env(self):
+ """Notifier must not crash when context['dag'] has no get_template_env
(e.g. SerializedDAG)."""
+
+ class _FakeDag:
Review Comment:
Why not use an actual `SerializedDag` instead of a simulated object? This is
better than no tests but it doesn’t establish that the real object involved in
the reported failure works through the notifier path
--
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]