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_factories.pyc
ó
ê=Nc@sÊdZddlZddlmZddlmZmZddlmZddl	m
Z
mZddlm
Z
de
fd	„ƒYZd
e
fd„ƒYZdefd
„ƒYZdefd„ƒYZdS(s&
Test code for basic Factory classes.
iÿÿÿÿN(tTestCase(treactortdefer(tClock(tFactorytReconnectingClientFactory(tInt16StringReceivertIncBs,eZd„Zd„Zd„Zd„ZRS(cCs
i|_dS(N(tmsgs(tself((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyt__init__scCs|jjd7_dS(Ni(tfactorytconnections(R	((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pytconnectionMadescCs<tj|ƒ\}}||j|<|jtj|ƒƒdS(N(tpickletloadsRt
sendStringtdumps(R	tmsgtn((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pytstringReceiveds
cCsN|jjj|jƒt|jjƒ|jjkrJ|jjjdƒndS(N(	RtallMessagestappendRtlentgoaltdtcallbacktNone(R	treason((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pytconnectionLosts(t__name__t
__module__R
R
RR(((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyRs			tOutcBsReZegedƒD]Zedef^qƒZd„Zd„Zd„ZRS(i
tXcCstjjƒ|_dS(N(R Rtcopy(R	((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyR
)scCsAx:|jjƒD])}|jtj||j|fƒƒqWdS(N(RtkeysRRR(R	ti((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyR
,scCsjtj|ƒ}|j|=|jsf|jjƒ|jjd8_|jjdkrf|jjƒqfndS(Nii(RRRt	transporttloseConnectionRthowManyTimest
stopTrying(R	RR((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyR0s
	
(	RRtdicttrangetxRR
R
R(((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyR &s/		t
FakeConnectorcBs eZdZd„Zd„ZRS(sP
    A fake connector class, to be used to mock connections failed or lost.
    cCsdS(N((R	((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pytstopConnecting@scCsdS(N((R	((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pytconnectDs(RRt__doc__R-R.(((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyR,;s	tReconnectingFactoryTestCasecBsVeZdZd„Zde_d„Zd„Zd„Zd„Zd„Z	d„Z
RS(	s1
    Tests for L{ReconnectingClientFactory}.
    cCsËtƒ}t|_d|_g|_d|_tjƒ|_t	ƒ}d|_
|_t|_d|_
tjd|ƒ}|j|jƒ|jƒj}tjd||ƒ|jj|j||ƒ|jS(Niigš™™™™™É?s	127.0.0.1(RRtprotocolRRRRtDeferredRRtinitialDelaytdelayR R'Rt	listenTCPt
addCleanupt
stopListeningtgetHosttportt
connectTCPtaddCallbackt_testStopTrying_1(R	tftcR9tPORT((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyttestStopTryingNs 								i
cCst|jt|jƒdd|jƒ|j|jdd|jƒ|j|jtjgdƒ|j|jdƒdS(Nisnot enough messages -- %ss-Number of successful connections incorrect %ds&stopTrying never called or ineffective(tassertEqualRRRR RtfailIftcontinueTrying(R	tresR=R>((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyR<escstdtf‡fd†ƒY}tƒ‰tƒˆ_|ƒˆ_ˆjƒ|jˆjjƒ|jˆjjƒƒdS(s
        Calling stopTrying on a L{ReconnectingClientFactory} doesn't attempt a
        retry on any active connector.
        tFactoryAwareFakeConnectorcs&eZeZ‡fd†Zd„ZRS(csˆj|dƒdS(s
                Behave as though an ongoing connection attempt has now
                failed, and notify the factory of this.
                N(tclientConnectionFailedR(R	(R=(s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyR-wscSs
t|_dS(s|
                Record an attempt to reconnect, since this is what we
                are trying to avoid.
                N(tTruetattemptedRetry(R	((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyR.~s(RRtFalseRHR-R.((R=(s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyREtsN(	R,RRtclockt	connectorR(tassertFalseRHtgetDelayedCalls(R	RE((R=s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyttest_stopTryingDoesNotReconnectos	
cCs;tƒ}tjtj|ƒƒ}|j|j|jƒdS(s™
        A L{ReconnectingClientFactory} which hasn't been used for anything
        can be pickled and unpickled and end up with the same state.
        N(RRRRRAt__dict__(R	toriginalt
reconstituted((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyttest_serializeUnused’s	cCsJtƒ}tƒ}||_tjtj|ƒƒ}|j|jdƒdS(s¢
        The clock attribute of L{ReconnectingClientFactory} is not serialized,
        and the restored value sets it to the default value, the reactor.
        N(RRRJRRRtassertIdenticalR(R	RJRPRQ((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyttest_serializeWithClockœs
			cCs°tƒ}|jtƒdƒ|j|jƒtj|ƒ}tj|ƒ}|j	|j
dƒ|j	|jdƒ|j	|jdƒ|j	|j
|jƒ|j	|jtƒdS(s¼
        A L{ReconnectingClientFactory} which is unpickled does not have an
        L{IConnector} and has its reconnecting timing parameters reset to their
        initial values.
        iN(RRFR,RR6R(RRRRARKt_callIDtretriesR4R3RCRG(R	Rt
serializedtunserialized((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyt$test_deserializationResetsParameters¨s	cCsKtƒ}tƒ}||_|jtƒdƒ|jt|jƒdƒdS(s‰
        The clock used by L{ReconnectingClientFactory} can be parametrized, so
        that one can cleanly test reconnections.
        iN(	RRRJtclientConnectionLostR,RRARtcalls(R	RJR((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyttest_parametrizedClock»s
			(RRR/R@ttimeoutR<RNRRRTRYR\(((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyR0Is			
	#	
		(R/Rttwisted.trial.unittestRttwisted.internetRRttwisted.internet.taskRttwisted.internet.protocolRRttwisted.protocols.basicRRR tobjectR,R0(((s?/usr/lib/python2.7/dist-packages/twisted/test/test_factories.pyt<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit