%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/227033/root/opt/alt/python27/lib/python2.7/site-packages/paste/
Upload File :
Create Path :
Current File : //proc/227033/root/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyc

�
|��Wc@s�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
yddlmZWn!ek
r�ddlmZnXddlZddlZddlmZddlmZddlmZd�Zd	efd
��YZd�Zdefd
��YZdefd��YZdefd��YZdefd��YZ defd��YZ!defd��YZ"defd��YZ#ej$dej%�Z&d�Z'defd��YZ(de(fd��YZ)e)e(j*d <d!e)fd"��YZ+e+e(j*d#<d$e(fd%��YZ,e,e(j*d&<d'e(fd(��YZ-e-e(j*d)<d*e-fd+��YZ.e.e(j*d,<d-e-fd.��YZ/e/e(j*d/<d0e(fd1��YZ0e0e(j*d2<e0e(j*d3<e0e(j*d4<d5efd6��YZ1d7efd8��YZ2d9efd:��YZ3d;efd<��YZ4e5d=�Z6e5e5e7d>�Z8d?�Z9e5d@�Z:dA�Z;dS(Bs
Routines for testing WSGI applications.

Most interesting is the `TestApp <class-paste.fixture.TestApp.html>`_
for testing WSGI applications, and the `TestFileEnvironment
<class-paste.fixture.TestFileEnvironment.html>`_ class for testing the
effects of command-line scripts.
i����N(t
BaseCookie(tStringIO(twsgilib(tlint(t
HeaderDictcGs
tj|�S(s�
    An os.tempnam with the warning turned off, because sometimes
    you just need to use this and don't care about the stupid
    security warning.
    (tosttempnam(targs((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyttempnam_no_warning#st	NoDefaultcBseZRS((t__name__t
__module__(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR	+scCst|�}|j�|S(N(tlisttsort(tl((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytsorted.s
t
Dummy_smtplibcBsGeZdZd�Zd�Zd�Zd�Zee�Zd�Z	RS(cCsWddl}|jdtd�|js5td��||_t|_||j_dS(Ni����s1Dummy_smtplib is not maintained and is deprecatedisIsmtplib.SMTP() called again before Dummy_smtplib.existing.reset() called.(	twarningstwarntDeprecationWarningtexistingtAssertionErrortservertTruetopent	__class__(tselfRR((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt__init__7s

			cCs&|jstd|��t|_dS(NsCalled %s.quit() twice(RRtFalse(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytquitCs
cCs||_||_||_dS(N(tfrom_addresstto_addressestmessage(RRRtmsg((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytsendmailHs		cCs
|t_dS(N(tsmtplibtSMTP(tcls((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytinstallMscCs&|jstd��d|j_dS(NsSMTP connection not quit(RRtNoneRR(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytresetRs
	N(
R
RR'RRRR"R&tclassmethodR((((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR3s				tAppErrorcBseZRS((R
R(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR*WstTestAppcBs�eZeZdddddd�Zd�Zd�Zdddded�Z	ddddded�Z
ddddded�Zddddded�Zdddded�Z
d	�Zd
�Zd�Zd�Zd
�Zd�Zd�ZRS(cCs�t|ttf�r:ddlm}||d|�}n||_||_||_|dkrji}n||_	||_
||_|j�dS(s}
        Wraps a WSGI application in a more convenient interface for
        testing.

        ``app`` may be an application, or a Paste Deploy app
        URI, like ``'config:filename.ini#test'``.

        ``namespace`` is a dictionary that will be written to (if
        provided).  This can be used with doctest or some other
        system, and the variable ``res`` will be assigned everytime
        you make a request (instead of returning the request).

        ``relative_to`` is a directory, and filenames used for file
        uploads are calculated relative to this.  Also ``config:``
        URIs that aren't absolute.

        ``extra_environ`` is a dictionary of values that should go
        into the environment for each request.  These can provide a
        communication channel with the application.

        ``pre_request_hook`` is a function to be called prior to
        making requests (such as ``post`` or ``get``). This function
        must take one argument (the instance of the TestApp).

        ``post_request_hook`` is a function, similar to
        ``pre_request_hook``, to be called after requests are made.
        i����(tloadapptrelative_toN(
t
isinstancetstrtunicodetpaste.deployR,tappt	namespaceR-R't
extra_environtpre_request_hooktpost_request_hookR((RR2R3R-R4R5R6R,((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR_s							cCs
i|_dS(sc
        Resets the state of the application; currently just clears
        saved cookies.
        N(tcookies(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR(�scCs|jj�}t|d<|S(Nspaste.throw_errors(R4tcopyR(Rtenviron((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt
_make_environ�s
c
Cs
|dkri}nt}|r~t|ttf�sNtj|dt�}nd|krg|d7}n
|d7}||7}n|j�}t|�}d|kr�|jdd�\}|d<n
d|d<|j	||�|j
|�t|||�}	|j|	d|�S(	s
        Get the given url (well, actually a path like
        ``'/page.html'``).

        ``params``:
            A query string, or a dictionary that will be encoded
            into a query string.  You may also include a query
            string on the ``url``.

        ``headers``:
            A dictionary of extra headers to send.

        ``extra_environ``:
            A dictionary of environmental variables that should
            be added to the request.

        ``status``:
            The integer status code you expect (if not 200 or 3xx).
            If you expect a 404 response, for instance, you must give
            ``status=404`` or it will be an error.  You can also give
            a wildcard, like ``'3*'`` or ``'*'``.

        ``expect_errors``:
            If this is not true, then if anything is written to
            ``wsgi.errors`` it will be an error.  If it is true, then
            non-200/3xx responses are also okay.

        Returns a `response object
        <class-paste.fixture.TestResponse.html>`_
        tdoseqt?t&itQUERY_STRINGttstatusN(
R'RR.R/R0turllibt	urlencodeR:tsplitt_set_headerstupdatetTestRequestt
do_request(
RturltparamstheadersR4R@t
expect_errorst__tracebackhide__R9treq((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytget�s& 	




R?c	Cs�|d
kri}n|d
kr*i}n|j�}	t|tttf�r`tj|�}nt|d�r�tj|j	��}n|r�t
j|dt�}|j
||�\}
}|
|	d<n|r�|	jdd�nd|kr|jdd�\}|	d<n
d|	d<tt|��|	d	<||	d
<t|�|	d<|j||	�|	j|�t||	|�}|j|d|�S(s'
        Do a generic request.
        titemstkeep_blank_valuestCONTENT_TYPEs!application/x-www-form-urlencodedR<iR>R?tCONTENT_LENGTHtREQUEST_METHODs
wsgi.inputR@N(R'R:R.RttupletdictRARBthasattrROtcgit	parse_qslRtencode_multipartt
setdefaultRCR/tlenRRDRERFRG(RtmethodRHRIRJR4R@tupload_filesRKR9tcontent_typeRM((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt_gen_request�s4		



cCs4|jd|d|d|d|d|d|d|�S(s�
        Do a POST request.  Very like the ``.get()`` method.
        ``params`` are put in the body of the request.

        ``upload_files`` is for file uploads.  It should be a list of
        ``[(fieldname, filename, file_content)]``.  You can also use
        just ``[(fieldname, filename)]`` and the file content will be
        read from disk.

        Returns a `response object
        <class-paste.fixture.TestResponse.html>`_
        tPOSTRIRJR4R@R]RK(R_(RRHRIRJR4R@R]RK((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytpost�scCs4|jd|d|d|d|d|d|d|�S(s�
        Do a PUT request.  Very like the ``.get()`` method.
        ``params`` are put in the body of the request.

        ``upload_files`` is for file uploads.  It should be a list of
        ``[(fieldname, filename, file_content)]``.  You can also use
        just ``[(fieldname, filename)]`` and the file content will be
        read from disk.

        Returns a `response object
        <class-paste.fixture.TestResponse.html>`_
        tPUTRIRJR4R@R]RK(R_(RRHRIRJR4R@R]RK((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytputscCs4|jd|d|d|d|d|ddd|�S(	s�
        Do a DELETE request.  Very like the ``.get()`` method.
        ``params`` are put in the body of the request.

        Returns a `response object
        <class-paste.fixture.TestResponse.html>`_
        tDELETERIRJR4R@R]RKN(R_R'(RRHRIRJR4R@RK((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytdeletes	cCs�|s
dSxv|j�D]h\}}|j�dkr>d}n7|j�dkrYd}nd|jdd�j�}|||<qWdS(	s9
        Turn any headers into environ variables
        Nscontent-typeRQscontent-lengthRRsHTTP_%st-t_(ROtlowertreplacetupper(RRJR9theadertvaluetvar((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRD(s		cCsCdtj�}g}xP|D]H\}}|jd|�|jd|�|jd�|j|�qWx�|D]�}|j|�\}}}|jd|�|jd||f�tj|�d}	|jd|	p�d�|jd�|j|�qpW|jd|d�|jd�d	j|�}
d
|}||
fS(s�
        Encodes a set of parameters (typically a name/value list) and
        a set of files (a list of (name, filename, file_body)) into a
        typical POST body, returning the (content_type, body).
        s----------a_BoUnDaRy%s$s--s)Content-Disposition: form-data; name="%s"R?s8Content-Disposition: form-data; name="%s"; filename="%s"isContent-Type: %ssapplication/octet-streams
s multipart/form-data; boundary=%s(trandomtappendt_get_file_infot	mimetypest
guess_typetjoin(RRItfilestboundarytlinestkeyRlt	file_infotfilenametfcontenttbodyR^((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRY7s,

		


cCs�t|�dkrv|d}|jr@tjj|j|�}nt|d�}|j�}|j�|d||fSt|�dkr�|Stdt	|�d ��dS(Niitrbiisuupload_files need to be a list of tuples of (fieldname, filename, filecontent) or (fieldname, filename); you gave: %rid(
R[R-RtpathRsRtreadtcloset
ValueErrortrepr(RRxRytftcontent((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRpTs
	
cCs�|jr|j|�nt}|jr�t�}x'|jj�D]\}}|||<qAWdjg|j�D]!}dj|j|jg�^qn�}||j	d<nt|j	d<i|j	d<t
j|j�}	t
j}
t|
�}zP|t
_tj�}|j}
tj|	|jd|
|j	�}tj�}Wd|
t
_t
jj|j��X|j|||�}||_xS|j	dj�D]>\}}t||�r�td|��nt|||�q�W|jdk	r�||jd	<n|js|j||�|j |�ni|_!x`|j"d
�D]O}t|�}x:|j�D],\}}|j|j|<|j|j!|<qQWq2W|j#r�|j#|�n|jdkr�|SdS(s�
        Executes the given request (``req``), with the expected
        ``status``.  Generally ``.get()`` and ``.post()`` are used
        instead.
        s; t=tHTTP_COOKIEs
paste.testingspaste.testing_variablestraise_on_wsgi_errorNsopaste.testing_variables contains the variable %r, but the response object already has an attribute by that nametress
set-cookie($R5RR7RRORstvaluesRwRlR9Rt
middlewareR2tsyststdoutt
CaptureStdoutttimeRKRtraw_interactiveRHtstderrtwritetgetvaluet_make_responsetrequestRVR�tsetattrR3R't
_check_statust
_check_errorstcookies_settall_headersR6(RRMR@RLtctnameRltmthcR2t
old_stdouttoutt
start_timeR�traw_restend_timeR�RkRwtmorsel((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRGgs`			=

		
		 
			cCst}|dkrdSt|ttf�r{|j|krwtd|jdjtt	|��|j
j|jf��ndS|dkr�|jdkr�|jdkr�dStd|j|j
j|jf��n||jkr�td|j|f��ndS(Nt*s*Bad response: %s (not one of %s for %s)
%ss, i�i�s7Bad response: %s (not 200 OK or 3xx redirect for %s)
%ssBad response: %s (not %s)(RR.RRTR@R*tfull_statusRstmapR/R�RHR{R'(RR@R�RL((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��s(cCs#|jrtd|j��ndS(Ns!Application had errors logged:
%s(terrorsR*(RR�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��s	cCs+|\}}}}t||||||�S(N(tTestResponse(Rt.1t
total_timeR@RJR{R�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��sN(R
RRtdisabledR'RR(R:RRNR_RaRcReRDRYRpRGR�R�R�(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR+Zs.+			6	"							<		R�cBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCst�|_||_dS(N(Rtcapturedtactual(RR�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�scCs$|jj|�|jj|�dS(N(R�R�R�(Rts((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��scCs|jj�dS(N(R�tflush(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��scCs"x|D]}|j|�qWdS(N(R�(RRvtitem((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt
writelines�s
cCs
|jj�S(N(R�R�(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��s(R
RRR�R�R�R�(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��s
				R�cBs2eZeZd�Zd�Zeedd�Zd�Zeedd�Z	e
jde
je
j
B�Zd�Zed�Zd	�Zd
�Zddddded�Zddddded�Zd
�Zdd�Ze
jd�Zd�Zeedd�Zd�Zd�Zd�Zd�Z d�Z!RS(cCsz||_t|j�d�|_||_||_tj|j�|_||_	||_
d|_||_
d|_dS(Ni(ttest_apptintRCR@R�RJRtfromlisttheader_dictR{R�R't_normal_bodyR�t_forms_indexed(RR�R@RJR{R�R�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�s							cCs#|jdkr|j�n|jS(s�
        Returns a dictionary of ``Form`` objects.  Indexes are both in
        order (from zero) and by form id (if the form is given an id).
        N(R�R't_parse_forms(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt
forms__get�s
tdocs�
                     A list of <form>s found on the page (instances of
                     `Form <class-paste.fixture.Form.html>`_)
                     cCsA|j}|std��nd|kr9td��n|dS(Ns*You used response.form, but no forms existis5You used response.form, but more than one form existsi(tformst	TypeError(RR�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt	form__get�s	s�
                    Returns a single `Form
                    <class-paste.fixture.Form.html>`_ instance; it
                    is an error if there are multiple forms on the
                    page.
                    s<(/?)([:a-z0-9_\-]*)(.*?)>c
CsWi}|_g}d}x�|jj|j�D]�}|jd�dk}|jd�j�}|dkrqq/n|r�|s�td|j���|j	|j||j
�!�d}q/|s�td|j���|j�}q/W|std|j|��xLt|�D]>\}}t||�}	|	||<|	j
r|	||	j
<qqWdS(Nit/itforms</form> unexpected at %ssNested form tags at %ssDanging form: %r(R�R't_tag_retfinditerR{tgroupRhRtstartRotendt	enumeratetFormtid(
RR�t
form_textststartedtmatchR�ttagtittextR�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�s.
		


	cCs�d}xX|jD]M\}}|j�|j�kr|sTtd|||f��|}qqW|dkr�|tkr�td|djg|jD]\}}|^q��f��q�|Sn|S(s�
        Returns the named header; an error if there is not exactly one
        matching header (unless you give a default -- always an error
        if there is more than one header)
        s&Ambiguous header: %s matches %r and %rsNo header found: %r (from %s)s, N(R'RJRhRR	tKeyErrorRs(RR�tdefaulttfoundtcur_nameRltntv((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRk+s

8cCsLg}x?|jD]4\}}|j�|j�kr|j|�qqW|S(sE
        Gets all headers by the ``name``, returns as a list
        (RJRhRo(RR�R�R�Rl((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�As
cKs}|jdkr|jdks1td|j��|jd�}tj|�\}}tj|�\}}|jj||�S(s�
        If this request is a redirect, follow that redirect.  It
        is an error if this is not a redirect response.  Returns
        another response object.
        i,i�s/You can only follow redirect responses (not %s)tlocation(	R@RR�RkRAt	splittypet	splithostR�RN(RtkwR�ttypetrestthostR}((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytfollowKs!
cCsbt}|jdddddd
d|d|d|d	|d
|d|�	\}}	}
|j|
d�S(s�
        Click the link as described.  Each of ``description``,
        ``linkid``, and ``url`` are *patterns*, meaning that they are
        either strings (regular expressions), compiled regular
        expressions (objects with a ``search`` method), or callables
        returning true or false.

        All the given patterns are ANDed together:

        * ``description`` is a pattern that matches the contents of the
          anchor (HTML and all -- everything between ``<a...>`` and
          ``</a>``)

        * ``linkid`` is a pattern that matches the ``id`` attribute of
          the anchor.  It will receive the empty string if no id is
          given.

        * ``href`` is a pattern that matches the ``href`` of the anchor;
          the literal content of that attribute, not the fully qualified
          attribute.

        * ``anchor`` is a pattern that matches the entire anchor, with
          its contents.

        If more than one link matches, then the ``index`` link is
        followed.  If ``index`` is not given and more than one link
        matches, or if no link matches, then ``IndexError`` will be
        raised.

        If you give ``verbose`` then messages will be printed about
        each link, and why it does or doesn't match.  If you use
        ``app.click(verbose=True)`` you'll see a list of all the
        links.

        You can use multiple criteria to essentially assert multiple
        aspects about the link, e.g., where the link's destination is.
        R�tat	href_attrthrefthref_extractR�R�thref_patternthtml_patterntindextverboseturiN(Rt
_find_elementR'tgoto(RtdescriptiontlinkidR�tanchorR�R�RLt
found_htmlt
found_desctfound_attrs((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytclickZs'	cCskt}|jdddddtjd�d|d|d	|d
|d|d|�	\}}	}
|j|
d
�S(s�
        Like ``.click()``, except looks for link-like buttons.
        This kind of button should look like
        ``<button onclick="...location.href='url'...">``.
        R�tbuttonR�tonclickR�slocation\.href='(.*?)'R�R�R�R�R�R�R�(RR�tretcompileR�(RR�tbuttonidR�R�R�R�RLR�R�R�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytclickbutton�s	c
	st|�}
t|�}t|�}t|�}
tjd||ftjtj�}�fd�}g}d}x�|j|j�D]�}|jd�}|jd�}|jd�}t|�}�r�|d|�n|j	|�s�|d|�q�n||}|rD|j
|�}|s2|d�q�n|jd�}n||d	<|jd
�rm|d�q�n|jd�r�|d
�q�n|d7}|
r�|
|�r�|d�q�n|r�||j	dd��r�|d�q�n|r||�r|d�q�n|
r.|
|�r.|d�q�n|d�|j|||f�q�W|skt
d|��n|dkr�t|�dkr�t
ddjg|D]\}}}t|�^q����n|d}nAy||}Wn0t
k
rt
dt|�||f��nX|S(Ns<%s\s+(.*?)>(.*?)</%s>cs�r|GHndS(N((R�(R�(s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytprintlog�siiisElement: %rs  Skipped: no %s attributes(  Skipped: doesn't match extract patternR�t#s&  Skipped: only internal fragment hrefsjavascript:s$  Skipped: cannot follow javascript:s$  Skipped: doesn't match descriptionR�R?s  Skipped: doesn't match ids  Skipped: doesn't match hrefs  Skipped: doesn't match htmls
  Accepteds-No matching elements found (from %s possible)sMultiple links match: %ss, s6Only %s (out of %s) links match; index %s out of range(t
_make_patternR�R�tItSR�R{R�t_parse_attrsRNtsearcht
startswithRot
IndexErrorR'R[RsR�(RR�R�R�R�R�R�R�R�R�tcontent_pattid_patthref_patthtml_patR�R�tfound_linksttotal_linksR�tel_htmltel_attrt
el_contenttattrstel_hrefR�tanctdtattrt
found_link((R�s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��s�











8

RNc	Ks�tj|�\}}}}}d}}}tj|||||f�}tj|jj|�}|j�}|dks�td|��|dkr�|jj	}n|jj
}|||�S(s
        Go to the (potentially relative) link ``href``, using the
        given method (``'get'`` or ``'post'``) and any extra arguments
        you want to pass to the ``app.get()`` or ``app.post()``
        methods.

        All hostnames and schemes will be ignored.
        R?RNRas9Only "get" or "post" are allowed for method (you gave %r)(sgetspost(turlparseturlsplitt
urlunsplitturljoinR�tfull_urlRhRR�RNRa(	RR�R\RtschemeR�R}tquerytfragment((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��s	
s
[ \n\r\t]+cCs4|jdkr-|jjd|j�|_n|jS(Nt (R�R't_normal_body_regextsubR{(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytnormal_body__gets	s]
                           Return the whitespace-normalized body
                           cCsst|ttf�s$t|�}nt|t�rE|jd�}n|jj|�dkpr|jj|�dkS(s�
        A response 'contains' a string if it is present in the body
        of the response.  Whitespace is normalized when searching
        for a string.
        tutf8i����(R.R/R0tencodeR{tfindtnormal_body(RR�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt__contains__scOs�d|kr;|d}|d=t|t�rA|g}qAng}|rVtd��nxK|D]C}||kr]tjd|IJtj|IJtd|��q]q]WxK|D]C}||kr�tjd|IJtj|IJtd|��q�q�WdS(s�
        Assert that the response contains all of the strings passed
        in as arguments.

        Equivalent to::

            assert string in res
        tnos)The only keyword argument allowed is 'no'sActual response (no %r):sBody does not contain string %rsActual response (has %r)sBody contains string %rN(R.t
basestringR�R�R�R�(RtstringsR�RR�tno_s((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytmustcontains*	




cCsd|j|jd fS(Ns<Response %s %r>i(R�R{(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt__repr__>scCszdjg|jj�D]}|j�r|^q�}d|jdjg|jD]\}}d||f^qP�|fS(Ns
sResponse: %s
%s
%ss%s: %s(RsR{t
splitlineststripR@RJ(RRtsimple_bodyR�R�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt__str__As2cCsrddl}tdd�d}t|d�}|j|j�|j�d|jtj	d�}|j
|�dS(s{
        Show this response in a browser window (for debugging purposes,
        when it's hard to read the HTML).
        i����Ns
paste-fixtures.htmltwbsfile:R�(t
webbrowserRR'RR�R{RRiRtseptopen_new(RR'tfnR�RH((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytshowbrowserIs
N("R
RRR�RR�tpropertyR�R�R�R�R�R�R�R�R�R	RkR�R�R'RR�R�R�R�RRRRR R!R%R+(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��s8	
									
		1		M					 		RFcBseZeZed�ZRS(cCsq|jd�r"|td�}n||_||_|jd�r[|d|d|_n	||_||_dS(Nshttp://localhostR>R<(R�R[RHR9RNRRK(RRHR9RK((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRps			(R
RRR�RR(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRFVsR�cBs�eZdZejdej�Zd�Zd�Zd�Z	d�Z
d�Zdd�Z
ded�Zdd	�Zddd
�Zddd�ZRS(
s
    This object represents a form that has been found in a page.
    This has a couple useful attributes:

    ``text``:
        the full HTML of the form.

    ``action``:
        the relative URI of the action.

    ``method``:
        the method (e.g., ``'GET'``).

    ``id``:
        the id, or None if not given.

    ``fields``:
        a dictionary of fields, each value is a list of fields by
        that name.  ``<input type="radio">`` and ``<select>`` are
        both represented as single fields with multiple options.
    s<(/?)([:a-z0-9_\-]*)([^>]*?)>cCs*||_||_|j�|j�dS(N(tresponseR�t
_parse_fieldst
_parse_action(RR-R�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�s		
c
CsJd}d}i}x(|jj|j�D]}|jd�dk}|jd�j�}|dkrjq(n|dkr�|r�|s�td	|jd
���d}q(n|dkr|r|s�td|j���t|j|d|j�!�|d
_	d}q(n|rq(nt
|jd��}d
|krG|jd
�}nd}|dkr�|jj
|jd�d|kf�q(n|dkr>|jd�dkr>|j|�}	|	s�t||||j�|�}	|j|g�j
|	�n|	d
}	t|	t�st�|	jj
|jd�d|kf�q(n|}
|dkrk|jdd�j�}
ntjj|
t�}|||||j�|�}	|dkr�|s�td||jd
�f��|	|j�f}n;|dkr |std||jd
�f��|	}n|j|g�j
|	�q(W||_dS(NiR�itinputtselecttoptionttextareaR�s%r without starting selectis$</textarea> with no <textarea> at %siR�RltselectedR�tradiotcheckedR�sNested textareas: %r and %rsNested selects: %r and %r(sinputsselectsoptionR3sbutton(R'R�R�R�R�RhRR�thtml_unquoteRlR�tpoptoptionsRoRNtRadioRZR.tFieldtclassesR�tfields(Rt	in_selecttin_textareaR=R�R�R�RR�tfieldttag_typet
FieldClass((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR.�sr			'!


	cCs�d|_x�|jj|j�D]�}|jd�dk}|jd�j�}|dkraqn|rkPnt|jd��}|jdd�|_|jdd	�|_	|jd
�|_
qWds�td��|jdk	s�td
��dS(NiR�iR�itactionR?R\tGETR�isNo </form> tag foundsNo <form> tag found(R'RCR�R�R�R�RhR�RNR\R�R(RR�R�R�R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR/�s	cCs�|jj|�}|dk	sOtd|djtt|jj���f��t|�dks�td|djtt|��f��||d_	dS(s�
        Set the value of the named field.  If there is 0 or multiple
        fields by that name, it is an error.

        Setting the value of a ``<select>`` selects the given option
        (and confirms it is an option).  Setting radio fields does the
        same.  Checkboxes get boolean values.  You cannot set hidden
        fields or buttons.

        Use ``.set()`` if there is any ambiguity and you must provide
        an index.
        s*No field by the name %r found (fields: %s)s, isMultiple fields match %r: %siN(
R=RNR'RRsR�R�tkeysR[Rl(RR�RlR=((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt__setitem__�s
+"cCsp|jj|�}|dk	s.td|��t|�dkshtd|djtt|��f��|dS(sE
        Get the named field object (ambiguity is an error).
        sNo field by the name %r foundisMultiple fields match %r: %ss, iN(R=RNR'RR[RsR�R�(RR�R=((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt__getitem__s
"cCs^|dkr|||<nA|jj|�}|dk	sGtd|��||}||_dS(sF
        Set the given name, using ``index`` to disambiguate.
        sNo fields found matching %rN(R'R=RNRRl(RR�RlR�R=R@((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytsets


cCs�|jj|�}|dkr.|tk	r.|S|dkrB||S|jj|�}|dk	sptd|��||}|SdS(sb
        Get the named/indexed field object, or ``default`` if no field
        is found.
        sNo fields found matching %rN(R=RNR'R	R(RR�R�R�R=R@((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRNs

cCs7|j|d|�}t|t�s*t�||_dS(s]
        Like ``.set()``, except also confirms the target is a
        ``<select>``.
        R�N(RNR.tSelectRRl(RR�RlR�R@((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR1/scKs:|j|d|�}|jj|jd|jd||�S(s	
        Submits the form.  If ``name`` is given, then also select that
        button (using ``index`` to disambiguate)``.

        Any extra keyword arguments are passed to the ``.get()`` or
        ``.post()`` method.

        Returns a response object.
        R�R\RI(t
submit_fieldsR-R�RCR\(RR�R�RR=((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytsubmit8s
cCs�g}|dk	rF|j|d|�}|j|j|j�f�nxn|jj�D]]\}}|dkrtqVnx<|D]4}|j}|dkr�q{n|j||f�q{WqVW|S(sf
        Return a list of ``[(name, value), ...]`` for the current
        state of the form.
        R�N(R'RNRoR�tvalue_if_submittedR=RORl(RR�R�RKR@R=Rl((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRJFs
	N(R
Rt__doc__R�R�R�R�RR.R/RFRGR'RHR	RNR1RKRJ(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�|s		=			
	sH([^= \n\r\t]+)[ \n\r\t]*(?:=[ \n\r\t]*(?:"([^"]*)"|([^"][^ \n\r\t>]*)))?cCssi}xftj|�D]U}|jd�j�}|jd�pL|jd�}t|p[d�}|||<qW|S(NiiiR?(t_attr_reR�R�RhR7(R�RR�t	attr_namet	attr_body((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�\sR;cBsSeZdZiZeZddd�Zd�Zd�Z	d�Z
ee
e�ZRS(s
    Field object.
    cKsC||_||_||_||_||_||_||_dS(N(R�R�R�tpost_valueR�R(RR�R�R�RQRlR�R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRps						cCs5|js(td|j|jf��n||_dS(Ns-You cannot set the value of the <%s> field %r(tsettabletAttributeErrorR�R�RR(RRl((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt
value__setzs
	cCs
||_dS(s^
        Like setting a value, except forces it even for, say, hidden
        fields.
        N(RR(RRl((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytforce_value�scCs|jS(N(RR(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt
value__get�sN(
R
RRMR<RRSR'RRURVRWR,Rl(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR;es				RIcBs8eZdZd�Zd�Zd�Zeee�ZRS(s)
    Field representing ``<select>``
    cOsWtt|�j||�g|_|jd�|_|jsJtd��d|_dS(Ntmultiples#<select multiple> not yet supported(	tsuperRIRR9RNRXRR't
selectedIndex(RRR((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�s	
	cCs�x�t|j�D]1\}\}}|t|�kr||_PqqWtd|djg|jD]\}}t|�^q^�f��dS(NsOption %r not found (from %s)s, (R�R9R/RZR�RsR�(RRlR�R2R6toR�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRU�s"		cCse|jdk	r!|j|jdSx=|jD]\}}|r+|Sq+W|jr]|jddSdSdS(Ni(RZR'R9(RR2R6((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRW�s	(R
RRMRRURWR,Rl(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRI�s
				
R1R:cBseZdZRS(s5
    Field representing ``<input type="radio">``
    (R
RRM(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR:�sR5tCheckboxcBs8eZdZd�Zd�Zd�Zeee�ZRS(s8
    Field representing ``<input type="checkbox">``
    cOs,tt|�j||�d|k|_dS(NR6(RYR\RR6(RRR((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�scCs||_dS(N(R6(RRl((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRU�scCs.|jr&|jdkrdS|jSndSdS(Nton(R6RRR'(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRW�s
	
(R
RRMRRURWR,Rl(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR\�s
				tcheckboxtTextcBseZdZddd�ZRS(s4
    Field representing ``<input type="text">``
    R?cKs,tj|||||d|d||�dS(NRlR�(R;R(RR�R�R�RQRlR�R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�sN(R
RRMR'R(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR_�sR�tTextareacBseZdZRS(s+
    Field representing ``<textarea>``
    (R
RRM(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR`�sR3tHiddencBseZdZRS(s6
    Field representing ``<input type="hidden">``
    (R
RRM(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRa�sthiddentSubmitcBs2eZdZeZd�Zee�Zd�ZRS(sG
    Field representing ``<input type="submit">`` and ``<button>``
    cCsdS(N(R'(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRW�scCs|jS(N(RR(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRLs(	R
RRMRRSRWR,RlRL(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRc�s
	RKR�timagetTestFileEnvironmentcBsweZdZeZd	d	d	d	ed	ed�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	d	d�Z
RS(
se
    This represents an environment in which files will be written, and
    scripts will be run.
    c		Cs||_||_|dkr0tjj�}n||_|dkr�tjdkrr|jdd�j	d�}q�|jdd�j	d�}n||_
|dkr�|}n||_|r�|j�n"tj
j|�s�tj|�n|p�g|_||_dS(s
        Creates an environment.  ``base_path`` is used as the current
        working directory, and generally where changes are looked for.

        ``template_path`` is the directory to look for *template*
        files, which are files you'll explicitly add to the
        environment.  This is done with ``.writefile()``.

        ``script_path`` is the PATH for finding executables.  Usually
        grabbed from ``$PATH``.

        ``environ`` is the operating system environment,
        ``os.environ`` if not given.

        ``cwd`` is the working directory, ``base_path`` by default.

        If ``start_clear`` is true (default) then the ``base_path``
        will be cleared (all files deleted) when an instance is
        created.  You can also use ``.clear()`` to clear the files.

        ``ignore_paths`` is a set of specific filenames that should be
        ignored when created in the environment.  ``ignore_hidden``
        means, if true (default) that filenames and directories
        starting with ``'.'`` will be ignored.
        twin32tPATHR?t;t:N(t	base_patht
template_pathR'RR9R8R�tplatformRNRCtscript_pathtcwdtclearR}texiststmakedirstignore_pathst
ignore_hidden(	RRjRkRmR9Rntstart_clearRrRs((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRs&						
cOs�t}t|dt�}t|d|�}t|d|j�}t|dd�}t|dt�}	tt|�}|s�tddj|j	����d|kr�|s�td	||f��|j
dd
�\}}tj
|�}n|j|�}|g|}
|j
�}tj|
dtjdtjdtjd|d
|j�}|j|�\}
}|j
�}t||
||
|d|jd|d|�}|	r�|GHddGHn|s�|j�n|s�|j�n|S(s�
        Run the command, with the given arguments.  The ``script``
        argument can have space-separated arguments, or you can use
        the positional arguments.

        Keywords allowed are:

        ``expect_error``: (default False)
            Don't raise an exception in case of errors
        ``expect_stderr``: (default ``expect_error``)
            Don't raise an exception if anything is printed to stderr
        ``stdin``: (default ``""``)
            Input to the script
        ``printresult``: (default True)
            Print the result after running
        ``cwd``: (default ``self.cwd``)
            The working directory to run in

        Returns a `ProcResponse
        <class-paste.fixture.ProcResponse.html>`_ object.
        texpect_errort
expect_stderrRntstdintprintresultsArguments not expected: %ss, Rs?You cannot give a multi-argument script (%r) and arguments (%s)iR�R�tenvt
returncodetfiles_beforetfiles_afterRfi(N(Rt_popgetRRnR'R�R/RRsRERCtshlext	_find_exet_find_filest
subprocesstPopentPIPER9tcommunicatet
ProcResultRztassert_no_errortassert_no_stderr(RtscriptRR�RLRuRvRnRwRxtallR{tprocR�R�R|tresult((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytrunJsL


				

cCs�|jdkrPtjj|j|�}tjj|�sLtd|��n|Sx<|jD]1}tjj||�}tjj|�rZ|SqZWtd|dj|j�f��dS(NsScript %s does not exists"Script %s could not be found in %sRi(RmR'RR}RsRnRptOSError(Rtscript_nameR}R*((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�scCsLi}x?tj|j�D]+}|j|�r4qn|j||�qW|S(N(RtlistdirRjt_ignore_filet_find_traverse(RR�R*((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��scCs?||jkrtS|jr;tjj|�jd�r;tStS(Nt.(RrRRsRR}tbasenameR�R(RR*((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��s
$cCs�tjj|j|�}tjj|�r�t|j|�||<xjtj|�D]@}tjj||�}|j|�r�qPn|j||�qPWnt	|j|�||<dS(N(
RR}RsRjtisdirtFoundDirR�R�R�t	FoundFile(RR}R�tfullR*((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��scCs<tjj|j�r(tj|j�ntj|j�dS(s=
        Delete all the files in the base directory.
        N(RR}RpRjtshutiltrmtreetmkdir(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRo�scCs�tjj|j|�}tjjtjj|��sRtjtjj|��nt|d�}|dk	r}|j	|�n|dk	r�|j
r�tjj|j
|�}nt|d�}|j	|j��|j�n|j�t
|j|�S(s�
        Write a file to the given path.  If ``content`` is given then
        that text is written, otherwise the file in ``frompath`` is
        used.  ``frompath`` is relative to ``self.template_path``
        R&R|N(RR}RsRjRptdirnameRqRR'R�RkR~RR�(RR}R�tfrompathR�R�tf2((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt	writefile�s	

N(R
RRMRR�R'RR�RR�R�R�RoR�(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRes	/	=					R�cBs2eZdZd�Zd�Zd�Zd�ZRS(s�
    Represents the results of running a command in
    `TestFileEnvironment
    <class-paste.fixture.TestFileEnvironment.html>`_.

    Attributes to pay particular attention to:

    ``stdout``, ``stderr``:
        What is produced

    ``files_created``, ``files_deleted``, ``files_updated``:
        Dictionaries mapping filenames (relative to the ``base_dir``)
        to `FoundFile <class-paste.fixture.FoundFile.html>`_ or
        `FoundDir <class-paste.fixture.FoundDir.html>`_ objects.
    c	Cs�||_||_||_||_||_||_||_||_i|_i|_	|j
�|_xm|j�D]_\}	}
|	|kr�|
|j|	<qvn|j|	=|
j
||	j
krv||	|j	|	<qvqvWdS(N(ttest_envRRwR�R�RzR{R|t
files_deletedt
files_updatedR8t
files_createdROtmtime(RR�RRwR�R�RzR{R|R}R�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�s$										

cCs,t}|jdks(td|j��dS(NisScript returned code: %s(RRzR(RRL((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��scCs/t}|jr+dGH|jGHtd��ndS(Ns
Error output:sstderr output not expected(RR�R(RRL((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��s
	c	
Cs�ddj|j�g}|jr9|jd|j�n|jrb|jd�|j|j�n|jr�|jd�|j|j�nx�d|jtfd|jtfd|j	tfgD]�\}}}|r�|jd	|�|j
�}|j�d
}xr|D]g\}}dt||dd
dt
�}|}|rb|jdkrb|d|j7}n|j|�qWq�q�Wdj|�S(NsScript result: %sRs  return code: %ss-- stderr: --------------------s-- stdout: --------------------tcreatedtdeletedtupdateds-- %s: -------------------R?s  %stindentitinclude_sepsN/As  (%s bytes)s
(RsRRzRoR�R�R�RR�R�ROR
t
_space_prefixRtsize(	RR�R�Rtt	show_sizetlastR}R�tt((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR%s4		
	
"

(R
RRMRR�R�R%(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��s
			R�cBsSeZdZeZeZd�Zd�Ze	e�Z
d�Zd�Zd�Z
RS(s
    Represents a single file found as the result of a command.

    Has attributes:

    ``path``:
        The path of the file, relative to the ``base_path``

    ``full``:
        The full path

    ``stat``:
        The results of ``os.stat``.  Also ``mtime`` and ``size``
        contain the ``.st_mtime`` and ``st_size`` of the stat.

    ``bytes``:
        The contents of the file.

    You may use the ``in`` operator with these objects (tested against
    the contents of the file), and the ``.mustcontain()`` method.
    cCsj||_||_tjj||�|_tj|j�|_|jj|_|jj|_	d|_dS(N(RjR}RRsR�tstattst_mtimeR�tst_sizeR�R't_bytes(RRjR}((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR9s		cCsD|jdkr=t|jd�}|j�|_|j�n|jS(NR|(R�R'RR�R~R(RR�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt
bytes__getBs

cCs
||jkS(N(tbytes(RR�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRJscCsBt}|j}||kr>d|GH|GH||ks>t�ndS(NsCould not find %r in:(RR�R(RR�RLR�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR Ms		cCsd|jj|j|jfS(Ns
<%s %s:%s>(RR
RjR}(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR!Us	(R
RRMRtfileRtdirRR�R,R�RR R!(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�s					R�cBs,eZdZeZeZd�Zd�ZRS(s6
    Represents a directory created by a command.
    cCs@||_||_tjj||�|_d|_d|_dS(NsN/A(RjR}RRsR�R�R�(RRjR}((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyRcs
			cCsd|jj|j|jfS(Ns
<%s %s:%s>(RR
RjR}(R((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR!js	(	R
RRMRR�RR�RR!(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�Zs
	cCs||kr|j|�S|S(s4
    Pop the key if found (else return default)
    (R8(RRwR�((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR}os
cCs|dkrtjj}n|j|�}|j|�}g}x�|r�|r�|d|dkr�|dkr�|jdt|d�t|��n|jd|�|jd�|jd�qBW|r|r�dj|�||j|�Sdj|�|j|�Sn
|j|�SdS(sg
    Anything shared by pref and full will be replaced with spaces
    in full, and full returned.
    iRR?N(	R'RR}R(RCRoR[R8Rs(tprefR�R(R�R�tpadding((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR�ws #(
cCsw|dkrdSt|ttf�r7tj|�}nt|d�rM|jSt|�r]|Sdsst	d|��dS(NR�is-Cannot make callable pattern object out of %r(
R'R.R/R0R�R�RVR�tcallableR(tpat((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR��s	cCs�ddl}|jdtd�|dkrDtj�jjd}nt|t	t
f�ritj|}nt|d�r�|j
�ndS(s�
    This is used by py.test if it is in the module, so you can
    import this directly.

    Use like::

        from paste.fixture import setup_module
    i����Nssetup_module is deprecatediR
treset_state(RRRR'R�t	_getframetf_backt	f_globalsR.R/R0tmodulesRVR�(tmoduleR((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pytsetup_module�s

cCs<x5ddd
ddgD]\}}|j||�}qW|S(s8
    Unquote (some) entities in HTML.  (incomplete)
    s&nbsp;Rs&gt;t>s&lt;t<s&quot;t"s&amp;R=(s&nbsp;R(s&gt;R�(s&lt;R�(s&quot;R�(s&amp;R=(Ri(R�tenttrepl((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyR7�s
	(<RMR�RnRARRqR�RWRR�R#R~tCookieRt	cStringIORtImportErrorR�R�tpasteRRtpaste.responseRRtobjectR	RRt	ExceptionR*R+R�R�RFR�R�R�RNR�R;RIR<R:R\R_R`RaRcReR�R�R�R'R}RR�R�R�R7(((s>/opt/alt/python27/lib/python2.7/site-packages/paste/fixture.pyt<module>
sz
		$�i��&�		()









�O<	

Zerion Mini Shell 1.0