def test__make_location_absolute_path(): result = Response._make_location_absolute( { "wsgi.url_scheme": "http", "HTTP_HOST": "example.com:80" }, "/abc") assert result == "http://example.com/abc"
def test__make_location_absolute_has_scheme_only(): result = Response._make_location_absolute( { "wsgi.url_scheme": "http", "HTTP_HOST": "example.com:80" }, "http:") assert result == "http:"
def test__make_location_absolute_already_absolute(): result = Response._make_location_absolute( { 'wsgi.url_scheme': 'http', 'HTTP_HOST': 'example.com:80' }, 'https://funcptr.net/') assert result == 'https://funcptr.net/'
def test__make_location_absolute_path(): result = Response._make_location_absolute( { 'wsgi.url_scheme': 'http', 'HTTP_HOST': 'example.com:80' }, '/abc') assert result == 'http://example.com/abc'
def test__make_location_absolute_has_scheme_only(): result = Response._make_location_absolute( { 'wsgi.url_scheme': 'http', 'HTTP_HOST': 'example.com:80' }, 'http:') assert result == 'http:'
def test__make_location_absolute_already_absolute(): result = Response._make_location_absolute( { 'wsgi.url_scheme': 'http', 'HTTP_HOST': 'example.com:80' }, 'https://funcptr.net/' ) assert result == 'https://funcptr.net/'
def test__make_location_absolute_path(): result = Response._make_location_absolute( { 'wsgi.url_scheme': 'http', 'HTTP_HOST': 'example.com:80' }, '/abc' ) assert result == 'http://example.com/abc'
def test__make_location_absolute_has_scheme_only(): result = Response._make_location_absolute( { 'wsgi.url_scheme': 'http', 'HTTP_HOST': 'example.com:80' }, 'http:' ) assert result == 'http:'
def test__make_location_absolute_already_absolute(): result = Response._make_location_absolute( { "wsgi.url_scheme": "http", "HTTP_HOST": "example.com:80" }, "https://funcptr.net/", ) assert result == "https://funcptr.net/"
def test__make_location_absolute_already_absolute(): result = Response._make_location_absolute( {"wsgi.url_scheme": "http", "HTTP_HOST": "example.com:80"}, "https://funcptr.net/", ) assert result == "https://funcptr.net/"
def test__make_location_absolute_path(): result = Response._make_location_absolute( {"wsgi.url_scheme": "http", "HTTP_HOST": "example.com:80"}, "/abc" ) assert result == "http://example.com/abc"
def test__make_location_absolute_has_scheme_only(): result = Response._make_location_absolute( {"wsgi.url_scheme": "http", "HTTP_HOST": "example.com:80"}, "http:" ) assert result == "http:"