{G_Tc@sdZddlZddlZddlmZddlmZdefdYZdejfdYZ d Z e d kre ndS( s^ These tests only check url parsing for now. We don't want to require the 'network' resource. iN(tSimpleHTTPRequestHandler(t test_supporttSocketlessRequestHandlercBseZdZRS(cCsdS(N((tself((s6/usr/local/lib/python2.7/test/test_SimpleHTTPServer.pyt__init__ s(t__name__t __module__R(((s6/usr/local/lib/python2.7/test/test_SimpleHTTPServer.pyR st SimpleHTTPRequestHandlerTestCasecBs)eZdZdZdZdZRS(s Test url parsing cCs:tj|_tjj|jd|_t|_dS(Ntfilename(tostgetcwdt translatedtpathtjoinRthandler(R((s6/usr/local/lib/python2.7/test/test_SimpleHTTPServer.pytsetUpscCss|jjd}|j||j|jjd}|j||j|jjd}|j||jdS(Ns /filenames/filename?foo=bars/filename?a=b&spam=eggs#zot(Rttranslate_patht assertEqualR (RR ((s6/usr/local/lib/python2.7/test/test_SimpleHTTPServer.pyttest_queryArgumentss cCsN|jjd}|j||j|jjd}|j||jdS(Ns //filenames//filename?foo=bar(RRRR (RR ((s6/usr/local/lib/python2.7/test/test_SimpleHTTPServer.pyttest_startWithDoubleSlashs(RRt__doc__RRR(((s6/usr/local/lib/python2.7/test/test_SimpleHTTPServer.pyRs  cCstjtdS(N(Rt run_unittestR(((s6/usr/local/lib/python2.7/test/test_SimpleHTTPServer.pyt test_main%st__main__( RR tunittesttSimpleHTTPServerRttestRRtTestCaseRRR(((s6/usr/local/lib/python2.7/test/test_SimpleHTTPServer.pyts