Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.134.111.63
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_docxmlrpc.pyc
�
?��cc@s�ddlmZddlZddlZddlZddlmZejd�ZddlZd�Z	d�Z
dejfd��YZd	�Z
ed
kr�e
�ndS(i����(tDocXMLRPCServerN(ttest_supportt	threadingcs |s
d�S�fd�}|S(NcSs|S(N((tfunc((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyt<lambda>
tcs�fd�}|S(Ncs3|jjdd�|jj�tj���dS(NtGETt/(tclienttrequesttgetresponsetunittesttSkipTest(tself(treason(s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pytmake_request_and_skips
((RR(R(s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyt	decorators((t	conditionRR((Rs:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pytmake_request_and_skipIf	scCs�tddt�}y�|jd�|jd�|jd�dtfd��Y}|j�|j|��d	�}|j|�|jd
��|SWn|j	��nXdS(Nt	localhostitlogRequestss"DocXMLRPCServer Test DocumentationsDocXMLRPCServer Test DocssmThis is an XML-RPC server's documentation, but the server can be used by POSTing to /RPC2. Try self.add, too.t	TestClasscBseZd�ZRS(cSs
||_dS(s7Test method's docs. This method truly does very little.N(targ(R
R((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyttest_method$s(t__name__t
__module__R(((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyR#scSs||S(sAdd two instances together. This follows PEP008, but has nothing
            to do with RFC1952. Case should matter: pEp008 and rFC1952.  Things
            that start with http and ftp should be auto-linked, too:
            http://google.com.
            ((txty((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pytadd+scSs||S(N((RR((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyR4R(Ri(
RtFalsetset_server_titletset_server_nametset_server_documentationtobjectt register_introspection_functionstregister_instancetregister_functiontserver_close(tservRR((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pytmake_servers 


	

tDocXMLRPCHTTPGETServercBs�eZd�Zd�Zd�Zd�Zd�Zeej	j
dkd�d��Zeej	j
dkd�d��Zd	�Z
d
�ZRS(cCsgtt_t�|_tjd|jj�|_|jj	�|jj
d}tjd|�|_
dS(Nttargetislocalhost:%d(tTrueRt_send_traceback_headerR'R&RtThreadt
serve_forevertthreadtstarttserver_addressthttplibtHTTPConnectionR(R
tPORT((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pytsetUp;s	
cCsA|jj�tt_|jj�|jj�|jj	�dS(N(
RtcloseRRR+R&tshutdownR.tjoinR%(R
((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyttearDownFs

	

cCs\|jjdd�|jj�}|j|jd�|j|jd�d�|j�dS(NRRi�sContent-types	text/html(RR	R
tassertEqualtstatust	getheadertread(R
tresponse((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyttest_valid_get_responseOs
cCs\|jjdd�|jj�}|j|jd�|j|jd�d�|j�dS(NRs/spami�sContent-types
text/plain(RR	R
R9R:R;R<(R
R=((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyttest_invalid_get_responseYs
cCs<|jjdd�|jj�}|jd|j��dS(s�Test that lambda functionality stays the same.  The output produced
        currently is, I suspect invalid because of the unencoded brackets in the
        HTML, "<lambda>".

        The subtraction lambda method is tested.
        RRsU<dl><dt><a name="-&lt;lambda&gt;"><strong>&lt;lambda&gt;</strong></a>(x, y)</dt></dl>N(RR	R
tassertInR<(R
R=((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyttest_lambdabs	is)Docstrings are omitted with -O2 and abovecCs<|jjdd�|jj�}|jd|j��dS(sTest that the server correctly automatically wraps references to
        PEPS and RFCs with links, and that it linkifies text starting with
        http or ftp protocol prefixes.

        The documentation for the "add" method contains the test material.
        RRsM<dl><dt><a name="-add"><strong>add</strong></a>(x, y)</dt><dd><tt>Add&nbsp;two&nbsp;instances&nbsp;together.&nbsp;This&nbsp;follows&nbsp;<a href="http://www.python.org/dev/peps/pep-0008/">PEP008</a>,&nbsp;but&nbsp;has&nbsp;nothing<br>
to&nbsp;do&nbsp;with&nbsp;<a href="http://www.rfc-editor.org/rfc/rfc1952.txt">RFC1952</a>.&nbsp;Case&nbsp;should&nbsp;matter:&nbsp;pEp008&nbsp;and&nbsp;rFC1952.&nbsp;&nbsp;Things<br>
that&nbsp;start&nbsp;with&nbsp;http&nbsp;and&nbsp;ftp&nbsp;should&nbsp;be&nbsp;auto-linked,&nbsp;too:<br>
<a href="http://google.com">http://google.com</a>.</tt></dd></dl>N(RR	R
R@R<(R
R=((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyttest_autolinkingps
		cCs<|jjdd�|jj�}|jd|j��dS(s�Test the presence of three consecutive system.* methods.

        This also tests their use of parameter type recognition and the
        systems related to that process.
        RRs'<dl><dt><a name="-system.listMethods"><strong>system.listMethods</strong></a>()</dt><dd><tt><a href="#-system.listMethods">system.listMethods</a>()&nbsp;=&gt;&nbsp;['add',&nbsp;'subtract',&nbsp;'multiple']<br>
&nbsp;<br>
Returns&nbsp;a&nbsp;list&nbsp;of&nbsp;the&nbsp;methods&nbsp;supported&nbsp;by&nbsp;the&nbsp;server.</tt></dd></dl>
 <dl><dt><a name="-system.methodHelp"><strong>system.methodHelp</strong></a>(method_name)</dt><dd><tt><a href="#-system.methodHelp">system.methodHelp</a>('add')&nbsp;=&gt;&nbsp;"Adds&nbsp;two&nbsp;integers&nbsp;together"<br>
&nbsp;<br>
Returns&nbsp;a&nbsp;string&nbsp;containing&nbsp;documentation&nbsp;for&nbsp;the&nbsp;specified&nbsp;method.</tt></dd></dl>
 <dl><dt><a name="-system.methodSignature"><strong>system.methodSignature</strong></a>(method_name)</dt><dd><tt><a href="#-system.methodSignature">system.methodSignature</a>('add')&nbsp;=&gt;&nbsp;[double,&nbsp;int,&nbsp;int]<br>
&nbsp;<br>
Returns&nbsp;a&nbsp;list&nbsp;describing&nbsp;the&nbsp;signature&nbsp;of&nbsp;the&nbsp;method.&nbsp;In&nbsp;the<br>
above&nbsp;example,&nbsp;the&nbsp;add&nbsp;method&nbsp;takes&nbsp;two&nbsp;integers&nbsp;as&nbsp;arguments<br>
and&nbsp;returns&nbsp;a&nbsp;double&nbsp;result.<br>
&nbsp;<br>
This&nbsp;server&nbsp;does&nbsp;NOT&nbsp;support&nbsp;system.methodSignature.</tt></dd></dl>N(RR	R
R@R<(R
R=((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyttest_system_methods�s
cCs<|jjdd�|jj�}|jd|j��dS(sTTest that selfdot values are made strong automatically in the
        documentation.RRs-Try&nbsp;self.<strong>add</strong>,&nbsp;too.N(RR	R
R@R<(R
R=((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyttest_autolink_dotted_methods�s	cCs�|jjd�|jjd�|jd|jj�|jd|jj�|jj�}tjd|�j	�}tjd|�j	�}|jd|�|jd|�dS(sSTest that the server title and documentation
        are escaped for HTML.
        stest_title<script>stest_documentation<script>s<title>(.+?)</title>s<p><tt>(.+?)</tt></p>s/<title>Python: test_title&lt;script&gt;</title>s0<p><tt>test_documentation&lt;script&gt;</tt></p>N(
R&RR R9tserver_titletserver_documentationtgenerate_html_documentationtretsearchtgroup(R
t	generatedttitlet
documentation((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyttest_server_title_escape�s	
		(RRR4R8R>R?RARtsystflagstoptimizeRBRCRDRN(((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyR(:s				
			"		cCstjt�dS(N(Rtrun_unittestR((((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyt	test_main�st__main__(RR1RHROttestRt
import_moduleRRRR'tTestCaseR(RSR(((s:/usr/local/python-2.7/lib/python2.7/test/test_docxmlrpc.pyt<module>s		#�	
© 2025 GrazzMean