Skip to content

Commit

Permalink
Add get email domain test
Browse files Browse the repository at this point in the history
When the TEST_MOZMAIL and ADDITIONAL_DOMAINS are set return the first domain from ADDITIONAL_DOMAINS
  • Loading branch information
say-yawn committed Aug 12, 2021
1 parent 55b43b2 commit b93e80f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions emails/tests/utils_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,8 @@ def test_get_email_domain_from_settings_on_heroku_test_mozmail_false(self):
def test_get_email_domain_from_settings_not_on_heroku_test_mozmail_false(self):
email_domain = get_email_domain_from_settings()
assert 'test.com' == email_domain

@override_settings(ON_HEROKU=True, ADDITIONAL_DOMAINS=['mozmail-test.com'], TEST_MOZMAIL=True)
def test_get_email_domain_from_settings_test_mozmail_true(self):
email_domain = get_email_domain_from_settings()
assert 'mozmail-test.com' == email_domain

0 comments on commit b93e80f

Please sign in to comment.