• File: testserver.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/proc/self/root/opt/alt/python27/lib/python2.7/site-packages/paste/debug/testserver.pyc
  • Date Modified: 08/01/2016 7:39 PM
  • File size: 4.17 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

aNc@sdZddlZddlTdefdYZddddZedkrddlZddl	m
Z
ee
Zd	ejZ
d
Zdedkstd
edkstejdejeje
ndS(s
WSGI Test Server

This builds upon paste.util.baseserver to customize it for regressions
where using raw_interactive won't do.


iN(t*tWSGIRegressionServercBsVeZdZdZdZdZdZdZdZdZ	dd	Z
RS(
sN
    A threaded WSGIServer for use in regression testing.  To use this
    module, call serve(application, regression=True), and then call
    server.accept() to let it handle one request.  When finished, use
    server.stop() to shutdown the server. Note that all pending requests
    are processed before the server shuts down.
    i
cOsEtj|||g|_g|_|j|_|jjddS(Ni(t
WSGIServert__init__tstoppingtpendingtdefaulttimeoutttimeouttsockett
settimeout(tselftargstkwargs((sG/opt/alt/python27/lib/python2.7/site-packages/paste/debug/testserver.pyRs
		cCs0ddlm}|d|j}|jdS(Ni(tThreadttarget(t	threadingR
t
serve_pendingtstart(R
R
tthread((sG/opt/alt/python27/lib/python2.7/site-packages/paste/debug/testserver.pyt
serve_forever scCs&|jr"tj|j|_ndS(N(Rttimetexpires(R
((sG/opt/alt/python27/lib/python2.7/site-packages/paste/debug/testserver.pyt
reset_expires$s	cOs.tj||||jj|jdS(N(Rt
close_requestRtpopR(R
RR((sG/opt/alt/python27/lib/python2.7/site-packages/paste/debug/testserver.pyR's
cCsx|jxg|js |jrstj}||jkrM|jrMdGHPn|jrc|jntjdq
WdS(Ns0
WARNING: WSGIRegressionServer timeout exceeded
g?(RRRRRRthandle_requesttsleep(R
tnow((sG/opt/alt/python27/lib/python2.7/site-packages/paste/debug/testserver.pyR+s
	
cCs|jjtdS(s/ stop the server (called from tester's thread) N(RtappendtTrue(R
((sG/opt/alt/python27/lib/python2.7/site-packages/paste/debug/testserver.pytstop7sicCs=|jstgt|D]}|jjt^qdS(s6 accept another request (called from tester's thread) N(RtAssertionErrortrangeRRR(R
tcounttx((sG/opt/alt/python27/lib/python2.7/site-packages/paste/debug/testserver.pytaccept:s(t__name__t
__module__t__doc__RRRRRRRR#(((sG/opt/alt/python27/lib/python2.7/site-packages/paste/debug/testserver.pyRs						cCs/t||||}d|jGH|j|S(Nsserving on %s:%s(Rtserver_addressR(tapplicationthosttportthandlertserver((sG/opt/alt/python27/lib/python2.7/site-packages/paste/debug/testserver.pytserve?s
t__main__(tdump_environshttp://%s:%scCs=tjdddl}|jdtjt|jS(Niii(R,R#Rtsetdefaulttimeoutturllibturlopentbaseuritread(tpathR((sG/opt/alt/python27/lib/python2.7/site-packages/paste/debug/testserver.pytfetchKs

sPATH_INFO: /foos/foosPATH_INFO: /wombles/womblei(R&Rtpaste.httpserverRRtNoneR-R$R1t
paste.wsgilibR/R,R'R3R6RR#RR2(((sG/opt/alt/python27/lib/python2.7/site-packages/paste/debug/testserver.pyt<module>s
/