CDLUC3 / ezid

CDLUC3 ezid
MIT License
10 stars 4 forks source link

Add email tests to the verify EZID scripts #746

Closed jsjiang closed 2 weeks ago

jsjiang commented 1 month ago

EZID uses the django.core.mail.send_mail() function and the EmailMessage class to send emails. Add tests to cover both.

The django.core.mail.send_mail() function is used in the following scripts:

They all use the send_mail() function in the same pattern:

django.core.mail.send_mail(
                        subject, message, django.conf.settings.SERVER_EMAIL, addresses
                    )

So a test that can cover the above send_mail function with the same parameters should be good enough.

The EmailMessage class is used in the impl/ui.py script to send Contact Us email to the EZID account. The ezid_ui_tests.py has a test for the Contact Us . Make sure the email notification goes through.

jsjiang commented 3 weeks ago

Modified the ezid_ui_tests.py script

jsjiang commented 3 weeks ago

Modified the verify_ezid_after_patching.py script:

jsjiang commented 2 weeks ago

Deployed with release v0.0.9