403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/twisted/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyc
ó
ê=Nc@sçdZddlmZddlmZmZddlmZmZddlm	Z	ddl
mZddlm
Z
ddlmZmZmZdd	lmZd
fd„ƒYZdee	fd
„ƒYZdee	fd„ƒYZdS(s$
Test the memcache client protocol.
iÿÿÿÿ(tConnectionDone(tMemCacheProtocolt
NoSuchCommand(tClientErrortServerError(tTestCase(t StringTransportWithDisconnection(tClock(tDeferredt
gatherResultstTimeoutError(tDeferredListtCommandMixincBsÂeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(sO
    Setup and tests for basic invocation of L{MemCacheProtocol} commands.
    cCs
tƒ‚dS(sp
        Helper test method to test the resulting C{Deferred} of a
        L{MemCacheProtocol} command.
        N(tNotImplementedError(tselftdtsendtrecvtresult((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyt_testscCs"|j|jjdƒdddƒS(sÉ
        L{MemCacheProtocol.get} returns a L{Deferred} which is called back with
        the value and the flag associated with the given key if the server
        returns a successful result.
        tfoos	get foo
sVALUE foo 0 3
bar
END
itbar(iR(Rtprototget(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_get"scCs"|j|jjdƒdddƒS(su
        Test getting a non-available key: it succeeds but return C{None} as
        value and C{0} as flag.
        Rs	get foo
sEND
iN(iN(RRRtNone(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyt
test_emptyGet,scCs6|j|jjddgƒddidd6d	d6ƒS(
s™
        L{MemCacheProtocol.getMultiple} returns a L{Deferred} which is called
        back with a dictionary of flag, value for each given key.
        Rtcows
get foo cow
s1VALUE foo 0 3
bar
VALUE cow 0 7
chicken
END
itchickenR(iR(isbar(RRtgetMultiple(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_getMultiple5scCs6|j|jjddgƒddidd6d
d6ƒS(s‰
        When L{MemCacheProtocol.getMultiple} is called with non-available keys,
        the corresponding tuples are (0, None).
        RRs
get foo cow
sVALUE cow 1 3
bar
END
iRi(isbarN(iN(RRRR(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_getMultipleWithEmpty@scCs%|j|jjddƒddtƒS(s†
        L{MemCacheProtocol.set} returns a L{Deferred} which is called back with
        C{True} when the operation succeeds.
        RRsset foo 0 0 3
bar
sSTORED
(RRtsettTrue(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_setKscCs%|j|jjddƒddtƒS(s†
        L{MemCacheProtocol.add} returns a L{Deferred} which is called back with
        C{True} when the operation succeeds.
        RRsadd foo 0 0 3
bar
sSTORED
(RRtaddR!(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_addTscCs%|j|jjddƒddtƒS(sŠ
        L{MemCacheProtocol.replace} returns a L{Deferred} which is called back
        with C{True} when the operation succeeds.
        RRsreplace foo 0 0 3
bar
sSTORED
(RRtreplaceR!(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_replace]scCs%|j|jjddƒddtƒS(sæ
        Test an erroneous add: if a L{MemCacheProtocol.add} is called but the
        key already exists on the server, it returns a B{NOT STORED} answer,
        which calls back the resulting L{Deferred} with C{False}.
        RRsadd foo 0 0 3
bar
sNOT STORED
(RRR#tFalse(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyt
test_errorAddfscCs%|j|jjddƒddtƒS(sí
        Test an erroneous replace: if a L{MemCacheProtocol.replace} is called
        but the key doesn't exist on the server, it returns a B{NOT STORED}
        answer, which calls back the resulting L{Deferred} with C{False}.
        RRsreplace foo 0 0 3
bar
sNOT STORED
(RRR%R'(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_errorReplacepscCs"|j|jjdƒddtƒS(s
        L{MemCacheProtocol.delete} returns a L{Deferred} which is called back
        with C{True} when the server notifies a success.
        Rsdelete bar
s	DELETED
(RRtdeleteR!(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_deletezscCs"|j|jjdƒddtƒS(s¾
        Test a error during a delete: if key doesn't exist on the server, it
        returns a B{NOT FOUND} answer which calls back the resulting L{Deferred}
        with C{False}.
        Rsdelete bar
sNOT FOUND
(RRR*R'(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_errorDeleteƒscCs"|j|jjdƒdddƒS(sµ
        Test incrementing a variable: L{MemCacheProtocol.increment} returns a
        L{Deferred} which is called back with the incremented value of the
        given key.
        Rsincr foo 1
s4
i(RRt	increment(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_incrementscCs"|j|jjdƒdddƒS(sµ
        Test decrementing a variable: L{MemCacheProtocol.decrement} returns a
        L{Deferred} which is called back with the decremented value of the
        given key.
        Rsdecr foo 1
s5
i(RRt	decrement(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_decrement—scCs%|j|jjddƒdddƒS(s‘
        L{MemCacheProtocol.increment} takes an optional argument C{value} which
        replaces the default value of 1 when specified.
        Risincr foo 8
s4
i(RRR-(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_incrementVal¡scCs%|j|jjddƒdddƒS(s‘
        L{MemCacheProtocol.decrement} takes an optional argument C{value} which
        replaces the default value of 1 when specified.
        Risdecr foo 3
s5
i(RRR/(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_decrementValªscCs-|j|jjƒddidd6dd6ƒS(së
        Test retrieving server statistics via the L{MemCacheProtocol.stats}
        command: it parses the data sent by the server and calls back the
        resulting L{Deferred} with a dictionary of the received statistics.
        sstats
s"STAT foo bar
STAT egg spam
END
RRtspamtegg(RRtstats(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyt
test_stats³scCs0|j|jjdƒddidd6dd6ƒS(s7
        L{MemCacheProtocol.stats} takes an optional C{str} argument which,
        if specified, is sent along with the I{STAT} command.  The I{STAT}
        responses from the server are parsed as key/value pairs and returned
        as a C{dict} (as in the case where the argument is not specified).
        tblahsstats blah
s"STAT foo bar
STAT egg spam
END
RRR3R4(RRR5(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_statsWithArgument¾scCs|j|jjƒdddƒS(s¸
        Test version retrieval via the L{MemCacheProtocol.version} command: it
        returns a L{Deferred} which is called back with the version sent by the
        server.
        s	version
s
VERSION 1.1
s1.1(RRtversion(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_versionÊscCs|j|jjƒddtƒS(s’
        L{MemCacheProtocol.flushAll} returns a L{Deferred} which is called back
        with C{True} if the server acknowledges success.
        sflush_all
sOK
(RRtflushAllR!(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyt
test_flushAllÔs(t__name__t
__module__t__doc__RRRRRR"R$R&R(R)R+R,R.R0R1R2R6R8R:R<(((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyRs*		
											
	
			
	
	
							
tMemCacheTestCasecBs
eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(s9
    Test client protocol class L{MemCacheProtocol}.
    cCs\tƒ|_tƒ|_|jj|j_tƒ|_|j|j_|jj|jƒdS(s{
        Create a memcache client, connect it to a string protocol, and make it
        use a deterministic clock.
        N(	RRRtclockt	callLaterRt	transporttprotocoltmakeConnection(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pytsetUpãscsL‡‡fd†}ˆjˆjjƒ|ƒ|j|ƒˆjj|ƒ|S(sñ
        Implementation of C{_test} which checks that the command sends C{send}
        data, and that upon reception of C{recv} the result is C{result}.

        @param d: the resulting deferred from the memcache command.
        @type d: C{Deferred}

        @param send: the expected data to be sent.
        @type send: C{str}

        @param recv: the data to simulate as reception.
        @type recv: C{str}

        @param result: the expected result.
        @type result: C{any}
        csˆj|ˆƒdS(N(tassertEqual(tres(RR(s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pytcbs(RGRCtvaluetaddCallbackRtdataReceived(RRRRRRI((RRs>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyRðs

cCsC|jjdƒd}|jt|jjdt|ƒ|fƒdS(s¥
        If the value returned doesn't match the expected key of the current
        C{get} command, an error is raised in L{MemCacheProtocol.dataReceived}.
        RtspameggsVALUE bar 0 %s
%s
END
N(RRtassertRaisestRuntimeErrorRLtlen(Rts((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_invalidGetResponse	s
		cCsI|jjddgƒd}|jt|jjdt|ƒ|fƒdS(sÁ
        If the value returned doesn't match one the expected keys of the
        current multiple C{get} command, an error is raised error in
        L{MemCacheProtocol.dataReceived}.
        RRRMsVALUE egg 0 %s
%s
END
N(RRRNRORLRP(RRQ((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_invalidMultipleGetResponses
		cs¡ˆjjdƒ}ˆjjdƒ}tƒ}|jˆj_ˆjjˆjjƒˆj|t	ƒˆj|t	ƒ‡fd†}|j
|ƒt|||gƒS(s²
        Test the timeout on outgoing requests: when timeout is detected, all
        current commands fail with a L{TimeoutError}, and the connection is
        closed.
        RRcsˆjt|ƒdƒdS(NsConnection timeout(RGtstr(terror(R(s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pytcheckMessage0s(RRRtcallbacktconnectionLostRAtadvancetpersistentTimeOutt
assertFailureR
RKR	(Rtd1td2td3RV((Rs>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_timeOut"s	
cs\ˆjjdƒ}ˆjjˆjjdƒˆjjdƒ‡fd†}|j|ƒ|S(sY
        When a request gets a response, no pending timeout call remains around.
        RisVALUE foo 0 3
bar
END
cs0ˆj|dƒˆjtˆjjƒdƒdS(NiR(isbar(RGRPRAtcalls(R(R(s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pytcheck?s(RRRARYRZRLRK(RRRa((Rs>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_timeoutRemoved6s
cCsp|jjdƒ}tƒ}|j|j_|jjdƒ|jj|jjƒ|j	|t
ƒt||gƒS(sÈ
        Test the timeout when raw mode was started: the timeout is not reset
        until all the data has been received, so we can have a L{TimeoutError}
        when waiting for raw data.
        RsVALUE foo 0 10
12345(RRRRWRXRLRARYRZR[R
R	(RR\R]((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_timeOutRawFs	cCsm|jjƒ}tƒ}|j|j_|jjdƒ|jj|jjƒ|j	|t
ƒt||gƒS(s†
        Test the timeout when stat command has started: the timeout is not
        reset until the final B{END} is received.
        sSTAT foo bar
(RR5RRWRXRLRARYRZR[R
R	(RR\R]((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_timeOutStatVs	cs›ˆjjdƒ}ˆjjdƒ‰tƒ}|jˆj_ˆjjˆjjdƒˆjjdƒ‡‡‡fd†}‡fd†‰|j	|ƒ|S(sŒ
        When two requests are sent, a timeout call remains around for the
        second request, and its timeout time is correct.
        RRisVALUE foo 0 3
bar
END
csrˆj|dƒˆjtˆjjƒdƒx*tˆjjƒD]}ˆjjdƒq?Wˆjˆt	ƒj
ˆƒS(NiRi(isbar(RGRPRAR`trangeRRZRYR[R
RK(Rti(t	checkTimeRR](s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyRars
cs+ˆjˆjjƒdˆjjdƒdS(Nii(RGRAtsecondsRRZ(tignored(R(s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyRgxs(
RRRRWRXRARYRZRLRK(RR\R^Ra((RgRR]s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_timeoutPipelininges	
cCs™|jjdƒ}tƒ}|j|j_|jj|jjdƒ|jjdƒ}|jjdƒ|j|t	ƒ|j|t	ƒt
|||gƒS(s
        Check that timeout is not resetted for every command, but keep the
        timeout from the first command without response.
        RiR(RRRRWRXRARYRZR[R
R	(RR\R^R]((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_timeoutNotResets	cCsj|jjdƒ}|jj|jjƒ|j|tƒ|jjdƒ}|j|tƒt||gƒS(s
        C{timeoutConnection} cleans the list of commands that it fires with
        C{TimeoutError}: C{connectionLost} doesn't try to fire them again, but
        sets the disconnected state so that future commands fail with a
        C{RuntimeError}.
        RR(	RRRARYRZR[R
ROR	(RR\R]((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_timeoutCleanDeferreds’scseˆjjdƒ}ˆjjdƒ}ˆjjƒt||gdtƒ}‡fd†}|j|ƒS(sl
        When disconnection occurs while commands are still outstanding, the
        commands fail.
        RRt
consumeErrorscs5x.|D]&\}}ˆj|ƒ|jtƒqWdS(N(tassertFalsettrapR(tresultstsuccessR(R(s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyt
checkFailuresªs
(RRRCtloseConnectionRR!RK(RR\R]tdoneRr((Rs>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_connectionLost¡s
cCs÷|j|jjdddƒtƒ}|j|jjddƒtƒ}|j|jjddƒtƒ}|j|jjdddƒtƒ}|j|jjdddƒtƒ}|j|jjdddgƒtƒ}t	||||||gƒS(s›
        An error is raised when trying to use a too long key: the called
        command returns a L{Deferred} which fails with a L{ClientError}.
        taiôRR(
R[RR RR-RtappendtprependRR	(RR\R]R^td4td5td6((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_tooLongKey±s%"""cCs^|jjddddddƒ}|j|jjƒdƒ|j|tƒ|jjdƒ|S(s¼
        When an unknown command is sent directly (not through public API), the
        server answers with an B{ERROR} token, and the command fails with
        L{NoSuchCommand}.
        R4RRitsegg foo 0 0 3
bar
sERROR
(Rt_setRGRCRJR[RRL(RR((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_invalidCommandÂs
!cstd}ˆjjd|ƒ}ˆjˆjjƒdƒˆj|tƒ‡fd†}|j|ƒˆjjdƒ|S(sÖ
        Test the L{ClientError} error: when the server sends a B{CLIENT_ERROR}
        token, the originating command fails with L{ClientError}, and the error
        contains the text sent by the server.
        teggspammRsset foo 0 0 8
eggspamm
csˆjt|ƒdƒdS(NsWe don't like egg and spam(RGRT(terr(R(s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyRaÚss)CLIENT_ERROR We don't like egg and spam
(	RR RGRCRJR[RRKRL(RRvRRa((Rs>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_clientErrorÏs
cstd}ˆjjd|ƒ}ˆjˆjjƒdƒˆj|tƒ‡fd†}|j|ƒˆjjdƒ|S(sÖ
        Test the L{ServerError} error: when the server sends a B{SERVER_ERROR}
        token, the originating command fails with L{ServerError}, and the error
        contains the text sent by the server.
        R€Rsset foo 0 0 8
eggspamm
csˆjt|ƒdƒdS(Ntzomg(RGRT(R(R(s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyRaìssSERVER_ERROR zomg
(	RR RGRCRJR[RRKRL(RRvRRa((Rs>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_serverErrorás
cCs|j|jjddƒtƒ}|j|jjdƒtƒ}|j|jjdƒtƒ}|j|jjdƒtƒ}|j|jjddƒtƒ}|j|jjddƒtƒ}|j|jj	ddgƒtƒ}t
|||||||gƒS(sQ
        Using a non-string key as argument to commands raises an error.
        ufooRueggiubarR4(R[RR RR-RR*RwRxRR	(RR\R]R^RyRzR{td7((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_unicodeKeyós!!!cCs|j|jjddƒtƒS(s;
        Using a non-string value raises an error.
        Rubar(R[RR R(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_unicodeValuescCs®|jjdƒ}|j|jd	ƒ|jjddƒ}|j|jtƒ|jjdƒ}|j|jd
ƒ|j|jjƒdƒ|jjdƒt	|||gƒS(s½
        Multiple requests can be sent subsequently to the server, and the
        protocol orders the responses correctly and dispatch to the
        corresponding client command.
        RiRtspamspamspamR4R3s0get foo
set bar 0 0 12
spamspamspam
get egg
s;VALUE foo 0 3
bar
END
STORED
VALUE egg 0 4
spam
END
(isbar(isspam(
RRRKRGR R!RCRJRLR	(RR\R]R^((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_pipelining	scCs‚|jjdƒ}|j|jd	ƒ|j|jjƒdƒ|jjdƒ|jjdƒ|jjdƒ|jjdƒ|S(
s”
        If the value retrieved by a C{get} arrive in chunks, the protocol
        is able to reconstruct it and to produce the good value.
        Rit
0123456789s	get foo
sVALUE foo 0 10
0123456t789s
ENDs
(iRŠ(RRRKRGRCRJRL(RR((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_getInChunksscCs%|j|jjddƒddtƒS(sÃ
        L{MemCacheProtocol.append} behaves like a L{MemCacheProtocol.set}
        method: it returns a L{Deferred} which is called back with C{True} when
        the operation succeeds.
        RRsappend foo 0 0 3
bar
sSTORED
(RRRwR!(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_append,scCs%|j|jjddƒddtƒS(sÄ
        L{MemCacheProtocol.prepend} behaves like a L{MemCacheProtocol.set}
        method: it returns a L{Deferred} which is called back with C{True} when
        the operation succeeds.
        RRsprepend foo 0 0 3
bar
sSTORED
(RRRxR!(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_prepend6scCs%|j|jjdtƒdddƒS(s©
        L{MemCacheProtocol.get} handles an additional cas result when
        C{withIdentifier} is C{True} and forward it in the resulting
        L{Deferred}.
        Rs
gets foo
sVALUE foo 0 3 1234
bar
END
it1234R(iRsbar(RRRR!(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyt	test_gets@scCs%|j|jjdtƒdddƒS(s“
        Test getting a non-available key with gets: it succeeds but return
        C{None} as value, C{0} as flag and an empty cas value.
        Rs
gets foo
sEND
iR}N(iR}N(RRRR!R(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_emptyGetsJscCs9|j|jjddgtƒddid
d6dd6ƒS(s‘
        L{MemCacheProtocol.getMultiple} handles an additional cas field in the
        returned tuples if C{withIdentifier} is C{True}.
        RRsgets foo bar
s8VALUE foo 0 3 1234
egg
VALUE bar 0 4 2345
spam
END
it2345R3RR4(iR’sspam(is1234segg(RRRR!(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_getsMultipleSscCs9|j|jjddgtƒddid
d6dd6ƒS(s
        When getting a non-available key with L{MemCacheProtocol.getMultiple}
        when C{withIdentifier} is C{True}, the other keys are retrieved
        correctly, and the non-available key gets a tuple of C{0} as flag,
        C{None} as value, and an empty cas value.
        RRsgets foo bar
sVALUE foo 0 3 1234
egg
END
iR}RR4N(iR}N(is1234segg(RRRR!R(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_getsMultipleWithEmpty^scCs+|j|jjddddƒddtƒS(s
        L{MemCacheProtocol.checkAndSet} passes an additional cas identifier
        that the server handles to check if the data has to be updated.
        RRtcasRscas foo 0 0 3 1234
bar
sSTORED
(RRtcheckAndSetR!(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_checkAndSetkscCs+|j|jjddddƒddtƒS(s„
        When L{MemCacheProtocol.checkAndSet} response is C{EXISTS}, the
        resulting L{Deferred} fires with C{False}.
        RRR•Rscas foo 0 0 3 1234
bar
sEXISTS
(RRR–R'(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyttest_casUnknowKeyts(R=R>R?RFRRRRSR_RbRcRdRjRkRlRuR|RR‚R„R†R‡R‰RŒRRŽRR‘R“R”R—R˜(((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyR@Þs:	
			
										
							
	
	
				
		tCommandFailureTestscBs eZdZd„Zd„ZRS(sZ
    Tests for correct failure of commands on a disconnected
    L{MemCacheProtocol}.
    cCsitƒ|_tƒ|_|jj|j_tƒ|_|j|j_|jj|jƒ|jj	ƒdS(sU
        Create a disconnected memcache client, using a deterministic clock.
        N(
RRRRARBRRCRDRERs(R((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyRF„scCs|j|tƒS(sÈ
        Implementation of C{_test} which checks that the command fails with
        C{RuntimeError} because the transport is disconnected. All the
        parameters except C{d} are ignored.
        (R[RO(RRRRR((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyR‘s(R=R>R?RFR(((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyR™~s	
N(R?ttwisted.internet.errorRttwisted.protocols.memcacheRRRRttwisted.trial.unittestRttwisted.test.proto_helpersRttwisted.internet.taskRttwisted.internet.deferRR	R
RRR@R™(((s>/usr/lib/python2.7/dist-packages/twisted/test/test_memcache.pyt<module>sÉÿ¡

Youez - 2016 - github.com/yon3zu
LinuXploit