SameerMesiah97 commented on code in PR #74605:
URL: https://github.com/apache/airflow/pull/74605#discussion_r4251679858


##########
providers/smtp/tests/unit/smtp/notifications/test_smtp.py:
##########
@@ -238,6 +238,53 @@ def test_notifier_with_nondefault_connection_extra(
                 **DEFAULT_EMAIL_PARAMS,
             )
 
+    @pytest.mark.parametrize(
+        ("connection_from_email", "config_from_email", "expected"),
+        [
+            pytest.param(TEST_SENDER, None, TEST_SENDER, id="connection-only"),
+            pytest.param(None, TEST_SENDER, TEST_SENDER, id="config-only"),
+            pytest.param(TEST_SENDER, f"config_{SENDER_EMAIL_SUFFIX}", 
TEST_SENDER, id="connection-wins"),
+        ],
+    )

Review Comment:
   Could we extend this parametrized test to cover an explicitly passed 
`from_email` in the notifier? Set different sender values for the explicit 
argument, connection and config, then assert that `send_email_smtp` receives 
the explicit value. This would verify that the passed argument takes precedence 
over both.



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