Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.10/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.10/test/__pycache__/test_docxmlrpc.cpython-310.pyc
o

�9j�"�@snddlmZddlZddlZddlZddlZddlZdd�Zdd�Z	Gdd�dej
�Zed	kr5e�
�dSdS)
�)�DocXMLRPCServerNcs|sdd�S�fdd�}|S)NcS�|S�N�)�funcrr�*/usr/lib/python3.10/test/test_docxmlrpc.py�<lambda>sz)make_request_and_skipIf.<locals>.<lambda>cs�fdd�}|S)Ncs"|j�dd�|j��t����)N�GET�/)�client�request�getresponse�unittest�SkipTest��self��reasonrr�make_request_and_skips

zImake_request_and_skipIf.<locals>.decorator.<locals>.make_request_and_skipr)rrrrr�	decorator
sz*make_request_and_skipIf.<locals>.decoratorr)�	conditionrrrrr�make_request_and_skipIfsrcCs�tddd�}zM|�d�|�d�|�d�Gdd�dt�}|��|�|��d	d
�}dtfdd
�}Gdd�d�}|�|�|�dd��|�|�|�|��|WS|�	��)N)�	localhostrF)�logRequestsz"DocXMLRPCServer Test DocumentationzDocXMLRPCServer Test DocszmThis is an XML-RPC server's documentation, but the server can be used by POSTing to /RPC2. Try self.add, too.c@seZdZdd�ZdS)zmake_server.<locals>.TestClasscSs
||_dS)z7Test method's docs. This method truly does very little.N)�arg)rrrrr�test_method#s
z*make_server.<locals>.TestClass.test_methodN)�__name__�
__module__�__qualname__rrrrr�	TestClass"srcSs||S)aAdd 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.
            r��x�yrrr�add*szmake_server.<locals>.addr!cSr)z Use function annotations. r)r!rrr�
annotation2szmake_server.<locals>.annotationc@seZdZdefdd�ZdS)z(make_server.<locals>.ClassWithAnnotationr!cSs|��Sr)�decode)rr!rrr�method_annotation7sz:make_server.<locals>.ClassWithAnnotation.method_annotationN)rrr�bytesr&rrrr�ClassWithAnnotation6sr(cSs||Srrr rrrr;szmake_server.<locals>.<lambda>)
r�set_server_title�set_server_name�set_server_documentation�object� register_introspection_functions�register_instance�int�register_function�server_close)�servrr#r$r(rrr�make_servers*

�

r3c@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zee	j
jdkd�d
d��Zee	j
jdkd�dd��Z
dd�Zdd�Zdd�ZdS)�DocXMLRPCHTTPGETServercCsLdt_t�|_tj|jjd�|_|j��|jj	d}t
j�d|�|_dS)NT)�target�zlocalhost:%d)
r�_send_traceback_headerr3r2�	threading�Thread�
serve_forever�thread�start�server_address�httpr�HTTPConnection)r�PORTrrr�setUpDs
zDocXMLRPCHTTPGETServer.setUpcCs2|j��dt_|j��|j��|j��dS)NF)	r�closerr7r2�shutdownr;�joinr1rrrr�tearDownOs



zDocXMLRPCHTTPGETServer.tearDowncC�D|j�dd�|j��}|�|jd�|�|�d�d�|��dS)Nr	r
���Content-typez	text/html�rrr
�assertEqual�status�	getheader�read�r�responserrr�test_valid_get_responseXs

z.DocXMLRPCHTTPGETServer.test_valid_get_responsecCrF)Nr	z/spami�rHz
text/plainrIrNrrr�test_invalid_get_responsebs

z0DocXMLRPCHTTPGETServer.test_invalid_get_responsecC�,|j�dd�|j��}|�d|���dS)z�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.
        r	r
sU<dl><dt><a name="-&lt;lambda&gt;"><strong>&lt;lambda&gt;</strong></a>(x, y)</dt></dl>N�rrr
�assertInrMrNrrr�test_lambdaks

�z"DocXMLRPCHTTPGETServer.test_lambda�z)Docstrings are omitted with -O2 and abovecC�,|j�dd�|j����}|�d|�dS)aTest 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.
        r	r
sN<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="https://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
rMrTrNrrr�test_autolinkingys		�z'DocXMLRPCHTTPGETServer.test_autolinkingcCrW)z�Test the presence of three consecutive system.* methods.

        This also tests their use of parameter type recognition and the
        systems related to that process.
        r	r
s�<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>NrXrNrrr�test_system_methods�s�z*DocXMLRPCHTTPGETServer.test_system_methodscCrR)zTTest that selfdot values are made strong automatically in the
        documentation.r	r
s-Try&nbsp;self.<strong>add</strong>,&nbsp;too.NrSrNrrr�test_autolink_dotted_methods�s

�z3DocXMLRPCHTTPGETServer.test_autolink_dotted_methodscCsH|j�dd�|j��}tjjdkrdnd}|�d|d|���dS)	z) Test that annotations works as expected r	r
rV�s5<dd><tt>Use&nbsp;function&nbsp;annotations.</tt></dd>sJ<dl><dt><a name="-annotation"><strong>annotation</strong></a>(x: int)</dt>se</dl>
<dl><dt><a name="-method_annotation"><strong>method_annotation</strong></a>(x: bytes)</dt></dl>N)rrr
�sys�flags�optimizerTrM)rrO�	docstringrrr�test_annotations�s
����z'DocXMLRPCHTTPGETServer.test_annotationscCs~|j�d�|j�d�|�d|jj�|�d|jj�|j��}t�d|��	�}t�d|��	�}|�d|�|�d|�dS)Nztest_title<script>ztest_documentation<script>z<title>(.+?)</title>z<p><tt>(.+?)</tt></p>z/<title>Python: test_title&lt;script&gt;</title>z0<p><tt>test_documentation&lt;script&gt;</tt></p>)
r2r)r+rJ�server_title�server_documentation�generate_html_documentation�re�search�group)r�	generated�title�
documentationrrr�test_server_title_escape�s�
z/DocXMLRPCHTTPGETServer.test_server_title_escapeN)rrrrArErPrQrUrr]r^r_rYrZr[rarkrrrrr4Cs"	
	�
�
	
r4�__main__)�
xmlrpc.serverr�http.clientr>rer]r8rrr3�TestCaser4r�mainrrrr�<module>s-�

Youez - 2016 - github.com/yon3zu
LinuXploit