tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
P\¬Qc@s¿ddlmZddlZddlZddlmZejdƒZddlZddlZddl    Z    da d„Z d„Z de    jfd„ƒYZd    „Zed
kr»eƒndS( iÿÿÿÿ(tDocXMLRPCServerN(t test_supportt    threadingcs |s d„S‡fd†}|S(NcSs|S(N((tfunc((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pyt<lambda>scs‡fd†}|S(Ncs3|jjddƒ|jjƒtjˆƒ‚dS(NtGETt/(tclienttrequestt getresponsetunittesttSkipTest(tself(treason(s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pytmake_request_and_skips ((RR(R (s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pyt    decorators((t    conditionR R((R s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pytmake_request_and_skipIf scCs
td dtƒ}zÖy»|jjƒda|jdƒ|jdƒ|jdƒdtfd    „ƒY}|j    ƒ|j
|ƒƒd
„}|j |ƒ|j d „ƒx$|dkrÎ|j ƒ|d8}q«WWntj k
rænXWd|jƒda|jƒXdS( Nt    localhostit logRequestsis"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[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pyt test_method*s(t__name__t
__module__R(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pytadd1scSs||S(N((RR((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pyR:s(Ri(RtFalsetsockett getsocknametPORTtset_server_titletset_server_nametset_server_documentationtobjectt register_introspection_functionstregister_instancetregister_functionthandle_requestttimeoutt server_closetNonetset(tevtt numrequeststservRR((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pytservers,  
     
 
tDocXMLRPCHTTPGETServercBs†eZd„Zd„Zd„Zd„Zd„Zeej    j
dkdƒd„ƒZ eej    j
dkdƒd„ƒZ d    „Z RS(
cCs¢tjƒ|_tt_tjƒ|_tj    dt
d|jdfƒj ƒd}x3|dkr‡t dkr‡tjdƒ|d8}qUWtjdt ƒ|_dS(Nttargettargsiièigü©ñÒMbP?s localhost:%d(Rtthreading_setupt_threadstTrueRt_send_traceback_headerRtEventR,tThreadR/tstartRR*ttimetsleepthttplibtHTTPConnectionR(R tn((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pytsetUpGs    % cCs7|jjƒ|jjƒtt_tj|j    ŒdS(N(
RtcloseR,twaitRRR6Rtthreading_cleanupR4(R ((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pyttearDownWs      cCs\|jjddƒ|jjƒ}|j|jdƒ|j|jdƒdƒ|jƒdS(NRRiÈs Content-types    text/html(RRR    t assertEqualtstatust    getheadertread(R tresponse((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pyttest_valid_get_response`s
cCs\|jjddƒ|jjƒ}|j|jdƒ|j|jdƒdƒ|jƒdS(NRs/spami”s Content-types
text/plain(RRR    RDRERFRG(R RH((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pyttest_invalid_get_responsejs
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(RRR    tassertInRG(R RH((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pyt test_lambdass    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(RRR    RKRG(R RH((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pyttest_autolinkings
       cCs<|jjddƒ|jjƒ}|jd|jƒƒdS(s³Test the precense 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(RRR    RKRG(R RH((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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(RRR    RKRG(R RH((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pyttest_autolink_dotted_methods¼s    (RRR?RCRIRJRLRtsystflagstoptimizeRMRNRO(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pyR0Fs                
           "cCstjtƒdS(N(Rt run_unittestR0(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pyt    test_mainÅst__main__(RR<RPttestRt import_moduleRR:RR
R*RRR/tTestCaseR0RTR(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_docxmlrpc.pyt<module>s             ,