Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use send_email wrapper to apply subject with server name when not prod #1407

Merged
merged 4 commits into from
Nov 6, 2024

Conversation

jgreben
Copy link
Contributor

@jgreben jgreben commented Nov 5, 2024

Fixes #1131

@jgreben jgreben requested a review from jermnelson November 5, 2024 21:40
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jermnelson Maybe you can help figure out why the test fail for this test file?

Copy link
Contributor Author

@jgreben jgreben Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When patching "libsys_airflow.plugins.digital_bookplates.email.send_email_with_server_name" it never calls the wrapper function when running the test, and so the test fails the assertion. If you change the patch to "libsys_airflow.plugins.shared.utils.send_email_with_server_name" it calls the wrapper function, but then it tries to send a real email and does not actually patch send_email.

@jgreben jgreben force-pushed the 1131-email-with-server-name branch from ecb7dcc to 998aab6 Compare November 5, 2024 21:47
@jgreben jgreben marked this pull request as ready for review November 6, 2024 19:21
@jermnelson jermnelson merged commit 48ee5b2 into main Nov 6, 2024
4 checks passed
@jermnelson jermnelson deleted the 1131-email-with-server-name branch November 6, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include server name in any emails sent from airflow
3 participants