Commit e06f5e40 by Edward Zarecor

whitespace

parent 5f5421f7
......@@ -62,7 +62,7 @@ def rewrite_video_url(cdn_base_url, original_video_url, whitelist):
# being returned as an empty string.
if not parsed.netloc:
return None
# Only re-write URLs if the original netloc is in the whitelist, otherwise
# no guarantees can be made that the re-write target can service the request.
try:
......@@ -71,7 +71,7 @@ def rewrite_video_url(cdn_base_url, original_video_url, whitelist):
except TypeError:
log.exception("message")
return None
# Contruction of the rewrite url is intentionally very flexible of input.
# For example, https://www.edx.org/ + /foo.html will be rewritten to
# https://www.edx.org/foo.html.
......
......@@ -832,7 +832,7 @@ class TestVideoCDNRewriting(BaseTestXmodule):
cdn_response_video_url
)
@override_settings(VIDEO_CDN_REWRITABLE_SOURCE_DOMAINS=["www.originalvideo.com","someother.com"])
@override_settings(VIDEO_CDN_REWRITABLE_SOURCE_DOMAINS=["www.originalvideo.com", "someother.com"])
@override_settings(VIDEO_CDN_URL={"CN": "https://chinacdn.cn/"})
def test_rewrite_url_extended_whitelist_success(self):
"""
......@@ -847,7 +847,7 @@ class TestVideoCDNRewriting(BaseTestXmodule):
cdn_response_video_url
)
@override_settings(VIDEO_CDN_REWRITABLE_SOURCE_DOMAINS=["someother.com","algumaoutra.pt"])
@override_settings(VIDEO_CDN_REWRITABLE_SOURCE_DOMAINS=["someother.com", "algumaoutra.pt"])
@override_settings(VIDEO_CDN_URL={"CN": "https://chinacdn.cn/"})
def test_rewrite_url_extended_whitelist_failure(self):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment