def test_request_uri_no_script_name(): from webob.response import _request_uri environ = { 'wsgi.url_scheme': 'http', 'HTTP_HOST': 'test.com', } assert _request_uri(environ) == 'http://test.com/'
def test_request_uri_no_script_name2(): # covers webob/response.py:1160 # There is a test_request_uri_no_script_name in test_response.py, but it # sets SCRIPT_NAME. from webob.response import _request_uri environ = {"wsgi.url_scheme": "http", "HTTP_HOST": "test.com", "PATH_INFO": "/foobar"} eq_(_request_uri(environ), "http://test.com/foobar")
def test_request_uri_no_script_name(): from webob.response import _request_uri environ = { 'wsgi.url_scheme': 'http', 'HTTP_HOST': 'test.com', 'SCRIPT_NAME': '/foobar', } eq_(_request_uri(environ), 'http://test.com/foobar')
def test_request_uri_https(): from webob.response import _request_uri environ = { 'wsgi.url_scheme': 'https', 'SERVER_NAME': 'test.com', 'SERVER_PORT': '443', 'SCRIPT_NAME': '/foobar', } assert _request_uri(environ) == 'https://test.com/foobar'
def test_request_uri_http(): # covers webob/response.py:1152 from webob.response import _request_uri environ = { 'wsgi.url_scheme': 'http', 'SERVER_NAME': 'test.com', 'SERVER_PORT': '80', 'SCRIPT_NAME': '/foobar', } assert _request_uri(environ) == 'http://test.com/foobar'
def test_request_uri_https(): from webob.response import _request_uri environ = { "wsgi.url_scheme": "https", "SERVER_NAME": "test.com", "SERVER_PORT": "443", "SCRIPT_NAME": "/foobar", } assert _request_uri(environ) == "https://test.com/foobar"
def test_request_uri_no_script_name2(): # covers webob/response.py:1160 # There is a test_request_uri_no_script_name in test_response.py, but it # sets SCRIPT_NAME. from webob.response import _request_uri environ = { 'wsgi.url_scheme': 'http', 'HTTP_HOST': 'test.com', 'PATH_INFO': '/foobar', } assert _request_uri(environ) == 'http://test.com/foobar'
def test_request_uri_http(): # covers webob/response.py:1152 from webob.response import _request_uri environ = { "wsgi.url_scheme": "http", "SERVER_NAME": "test.com", "SERVER_PORT": "80", "SCRIPT_NAME": "/foobar", } assert _request_uri(environ) == "http://test.com/foobar"
def test_request_uri_no_script_name2(): # covers webob/response.py:1160 # There is a test_request_uri_no_script_name in test_response.py, but it # sets SCRIPT_NAME. from webob.response import _request_uri environ = { "wsgi.url_scheme": "http", "HTTP_HOST": "test.com", "PATH_INFO": "/foobar", } assert _request_uri(environ) == "http://test.com/foobar"
def test_request_uri_no_script_name(): from webob.response import _request_uri environ = {"wsgi.url_scheme": "http", "HTTP_HOST": "test.com"} assert _request_uri(environ) == "http://test.com/"