diff --git a/tests/app/test_utils.py b/tests/app/test_utils.py index 861a11042..29ed54672 100644 --- a/tests/app/test_utils.py +++ b/tests/app/test_utils.py @@ -5,10 +5,12 @@ from pathlib import Path import pytest from freezegun import freeze_time +from notifications_utils.recipients import validate_email_address from app import format_datetime_relative from app.utils import ( AgreementInfo, + GovernmentEmailDomain, Spreadsheet, email_safe, generate_next_dict, @@ -456,6 +458,8 @@ def test_validate_government_domain_data(): for domain in AgreementInfo.domains.keys(): + validate_email_address('test@{}'.format(domain)) + agreement_info = AgreementInfo(domain) assert agreement_info.crown_status in { @@ -473,6 +477,12 @@ def test_validate_government_domain_data(): } +def test_validate_email_domain_data(): + + for domain in GovernmentEmailDomain.domains.keys(): + validate_email_address('test@{}'.format(domain)) + + @pytest.mark.parametrize('time, human_readable_datetime', [ ('2018-03-14 09:00', '14 March at 9:00am'), ('2018-03-14 15:00', '14 March at 3:00pm'),