Skip to content

Commit

Permalink
Test get_domains_from_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
say-yawn committed Aug 18, 2021
1 parent 3c6c411 commit 36588a9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions emails/tests/utils_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from emails.utils import (
generate_relay_From,
get_domains_from_settings,
get_email_domain_from_settings,
)

Expand Down Expand Up @@ -76,7 +77,10 @@ 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
@override_settings(RELAY_FIREFOX_DOMAIN='firefox.com', MOZMAIL_DOMAIN='mozmail.com')
def test_get_domains_from_settings(self):
domains = get_domains_from_settings()
assert domains == {
'RELAY_FIREFOX_DOMAIN': 'firefox.com',
'MOZMAIL_DOMAIN': 'mozmail.com'
}

0 comments on commit 36588a9

Please sign in to comment.