Example #1
0
 def test_path_info_and_script_name_fetching(self):
     env = create_environ(u'/\N{SNOWMAN}', u'http://example.com/\N{COMET}/')
     self.assert_equal(wsgi.get_path_info(env), u'/\N{SNOWMAN}')
     self.assert_equal(wsgi.get_path_info(env, charset=None),
                       u'/\N{SNOWMAN}'.encode('utf-8'))
     self.assert_equal(wsgi.get_script_name(env), u'/\N{COMET}')
     self.assert_equal(wsgi.get_script_name(env, charset=None),
                       u'/\N{COMET}'.encode('utf-8'))
Example #2
0
def test_path_info_and_script_name_fetching():
    env = create_environ(u'/\N{SNOWMAN}', u'http://example.com/\N{COMET}/')
    assert wsgi.get_path_info(env) == u'/\N{SNOWMAN}'
    assert wsgi.get_path_info(env,
                              charset=None) == u'/\N{SNOWMAN}'.encode('utf-8')
    assert wsgi.get_script_name(env) == u'/\N{COMET}'
    assert wsgi.get_script_name(env,
                                charset=None) == u'/\N{COMET}'.encode('utf-8')
Example #3
0
 def test_path_info_and_script_name_fetching(self):
     env = create_environ(u'/\N{SNOWMAN}', u'http://example.com/\N{COMET}/')
     self.assert_equal(wsgi.get_path_info(env), u'/\N{SNOWMAN}')
     self.assert_equal(wsgi.get_path_info(env, charset=None), u'/\N{SNOWMAN}'.encode('utf-8'))
     self.assert_equal(wsgi.get_script_name(env), u'/\N{COMET}')
     self.assert_equal(wsgi.get_script_name(env, charset=None), u'/\N{COMET}'.encode('utf-8'))
Example #4
0
def test_path_info_and_script_name_fetching():
    env = create_environ(u'/\N{SNOWMAN}', u'http://example.com/\N{COMET}/')
    assert wsgi.get_path_info(env) == u'/\N{SNOWMAN}'
    assert wsgi.get_path_info(env, charset=None) == u'/\N{SNOWMAN}'.encode('utf-8')
    assert wsgi.get_script_name(env) == u'/\N{COMET}'
    assert wsgi.get_script_name(env, charset=None) == u'/\N{COMET}'.encode('utf-8')
Example #5
0
 def test_path_info_and_script_name_fetching(self):
     env = create_environ(u"/\N{SNOWMAN}", u"http://example.com/\N{COMET}/")
     self.assert_equal(wsgi.get_path_info(env), u"/\N{SNOWMAN}")
     self.assert_equal(wsgi.get_path_info(env, charset=None), u"/\N{SNOWMAN}".encode("utf-8"))
     self.assert_equal(wsgi.get_script_name(env), u"/\N{COMET}")
     self.assert_equal(wsgi.get_script_name(env, charset=None), u"/\N{COMET}".encode("utf-8"))
Example #6
0
def test_path_info_and_script_name_fetching():
    env = create_environ("/\N{SNOWMAN}", "http://example.com/\N{COMET}/")
    assert wsgi.get_path_info(env) == "/\N{SNOWMAN}"
    assert wsgi.get_path_info(env, charset=None) == "/\N{SNOWMAN}".encode()
    assert wsgi.get_script_name(env) == "/\N{COMET}"
    assert wsgi.get_script_name(env, charset=None) == "/\N{COMET}".encode()
Example #7
0
def test_path_info_and_script_name_fetching():
    env = create_environ(u"/\N{SNOWMAN}", u"http://example.com/\N{COMET}/")
    assert wsgi.get_path_info(env) == u"/\N{SNOWMAN}"
    assert wsgi.get_path_info(env, charset=None) == u"/\N{SNOWMAN}".encode("utf-8")
    assert wsgi.get_script_name(env) == u"/\N{COMET}"
    assert wsgi.get_script_name(env, charset=None) == u"/\N{COMET}".encode("utf-8")