mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
Use named arguments for clearer string formatting
Helps when the string is long. Also helps disambiguate between the CDN domain used for the logos and those for CSS/JS.
This commit is contained in:
@@ -16,7 +16,7 @@ from app.utils import (
|
||||
generate_next_dict,
|
||||
generate_notifications_csv,
|
||||
generate_previous_dict,
|
||||
get_cdn_domain,
|
||||
get_logo_cdn_domain,
|
||||
)
|
||||
from tests.conftest import fake_uuid
|
||||
|
||||
@@ -278,13 +278,13 @@ def test_generate_notifications_csv_calls_twice_if_next_link(
|
||||
|
||||
def test_get_cdn_domain_on_localhost(client, mocker):
|
||||
mocker.patch.dict('app.current_app.config', values={'ADMIN_BASE_URL': 'http://localhost:6012'})
|
||||
domain = get_cdn_domain()
|
||||
domain = get_logo_cdn_domain()
|
||||
assert domain == 'static-logos.notify.tools'
|
||||
|
||||
|
||||
def test_get_cdn_domain_on_non_localhost(client, mocker):
|
||||
mocker.patch.dict('app.current_app.config', values={'ADMIN_BASE_URL': 'https://some.admintest.com'})
|
||||
domain = get_cdn_domain()
|
||||
domain = get_logo_cdn_domain()
|
||||
assert domain == 'static-logos.admintest.com'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user