bito-code-review[bot] commented on PR #40647:
URL: https://github.com/apache/superset/pull/40647#issuecomment-4663308031
<!-- Bito Reply -->
The observation is accurate. The current unit test
`test_smtp_ssl_server_auth_defaults_to_true` only verifies the module-level
configuration value, and the integration test `test_send_mime_ssl` explicitly
disables the feature, leaving the enabled path untested. To improve coverage, a
new test case should be added that mocks `ssl.create_default_context` and
verifies it is called when `SMTP_SSL_SERVER_AUTH` is `True` (the default).
**tests/unit_tests/config_test.py**
```
def test_smtp_ssl_server_auth_defaults_to_true() -> None:
"""
The shipped default for SMTP_SSL_SERVER_AUTH validates the SMTP server's
TLS certificate. Operators can still opt out by overriding it to False.
"""
from superset import config
assert config.SMTP_SSL_SERVER_AUTH is True
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]