forked from ubccr/coldfront
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change domain_url setting to default to SITE_DOMAIN
- Loading branch information
1 parent
18321e6
commit a26bab4
Showing
4 changed files
with
7 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
email_template_context, | ||
send_allocation_admin_email, | ||
send_allocation_customer_email, | ||
CENTER_BASE_URL, | ||
build_link, | ||
logger | ||
) | ||
|
@@ -21,6 +20,7 @@ | |
@patch('coldfront.core.utils.mail.EMAIL_SENDER', '[email protected]') | ||
@patch('coldfront.core.utils.mail.EMAIL_TICKET_SYSTEM_ADDRESS', '[email protected]') | ||
@patch('coldfront.core.utils.mail.EMAIL_CENTER_NAME', 'HPC Center') | ||
@patch('coldfront.core.utils.mail.SITE_DOMAIN', 'sitedomain.org') | ||
@patch('coldfront.core.utils.mail.EMAIL_SIGNATURE', 'HPC Center Team') | ||
# @patch('coldfront.config.base.INSTALLED_APPS', 'coldfront.plugins') | ||
class EmailFunctionsTestCase(TestCase): | ||
|
@@ -109,7 +109,7 @@ def test_build_link(self): | |
domain_url = 'https://example.com' | ||
expected_url = f'{domain_url}{url_path}' | ||
self.assertEqual(build_link(url_path, domain_url), expected_url) | ||
self.assertEqual(build_link(url_path), f'{CENTER_BASE_URL}{url_path}') | ||
self.assertEqual(build_link(url_path), f'sitedomain.org{url_path}') | ||
|
||
def test_allocation_reaching_capacity_operations(self): | ||
allocation_obj = MagicMock() | ||
|