def do_request(connstream, from_addr): x = object() SimpleHTTPServer.SimpleHTTPRequestHandler(connstream, from_addr, x)
def test_translate_path(): url = "http://yy.com/ai/xy/" handler = SimpleHTTPServer.SimpleHTTPRequestHandler(None, None, None) print handler.translate_path(url)