File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -35,3 +35,21 @@ def test_get_stripped_url_path_params():
3535 url = 'https://my.domain.cloudfront.net/a/path/to/a/file.html?a=1'
3636 result = du .get_stripped_url (url )
3737 assert result == 'my.domain.cloudfront.net/a/path/to/a/file.html'
38+
39+
40+ def test_get_stripped_url_non_http_scheme_none ():
41+ url = 'about:blank'
42+ result = du .get_stripped_url (url , non_http_scheme = None )
43+ assert result is None
44+
45+
46+ def test_get_stripped_url_non_http_scheme_return_self ():
47+ url = 'about:blank'
48+ result = du .get_stripped_url (url , non_http_scheme = 'self' )
49+ assert result == url
50+
51+
52+ def test_get_stripped_url_only_accepts_correct_args_for_non_http_scheme ():
53+ with pytest .raises (ValueError ):
54+ result = du .get_stripped_url (url , non_http_scheme = 'milk' )
55+
You can’t perform that action at this time.
0 commit comments