Skip to content

Commit

Permalink
Fix get email domain from settings
Browse files Browse the repository at this point in the history
When the TEST_MOZMAIL and ADDITIONAL_DOMAINS are not set in settings return the domain based on the ON_HEROKU setting
  • Loading branch information
say-yawn committed Aug 12, 2021
1 parent 7d1f550 commit 55b43b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions emails/tests/utils_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ def test_generate_relay_From_with_linebreak_chars(self):
)
assert formatted_from_address == expected_formatted_from

@override_settings(ON_HEROKU=True, SITE_ORIGIN='https://test.com')
def test_get_email_domain_from_settings_on_heroku(self):
@override_settings(ON_HEROKU=True, SITE_ORIGIN='https://test.com', TEST_MOZMAIL=False)
def test_get_email_domain_from_settings_on_heroku_test_mozmail_false(self):
email_domain = get_email_domain_from_settings()
assert 'mail.test.com' == email_domain

@override_settings(ON_HEROKU=False, SITE_ORIGIN='https://test.com')
def test_get_email_domain_from_settings_not_on_heroku(self):
@override_settings(ON_HEROKU=False, SITE_ORIGIN='https://test.com', TEST_MOZMAIL=False)
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

0 comments on commit 55b43b2

Please sign in to comment.