Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/twisted/test/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/twisted/test/test_postfix.pyc

ó
ê=Nc@s‚dZddlmZddlmZddlmZdejfd„ƒYZddd„ƒYZ	d	e	ejfd
„ƒYZ
dS(
s2
Test cases for twisted.protocols.postfix module.
iÿÿÿÿ(tunittest(tpostfix(tStringTransporttPostfixTCPMapQuoteTestCasec	Bs,eZdddddddgZd„ZRS(tfoosfoo bars	foo%20barsfoo	bars	foo%09barsfoo
bars	foo%0Abars	foo%0abarsfoo
barsfoo%0D%0Abarsfoo%0D%0abarsfoo%0d%0Abarsfoo%0d%0abarsfoo sfoo%20s foos%20foocCssxl|jD]a}|d}|d}|jtj|ƒ|dƒx'|D]}|jtj|ƒ|ƒqHWq
WdS(Nii(tdatatassertEqualRtquotetunquote(tselftentrytrawtquotedtq((s=/usr/lib/python2.7/dist-packages/twisted/test/test_postfix.pyttestDatas


(RR(sfoo bars	foo%20bar(sfoo	bars	foo%09bar(sfoo
bars	foo%0Abars	foo%0abar(sfoo
barsfoo%0D%0Abarsfoo%0D%0abarsfoo%0d%0Abarsfoo%0d%0abar(sfoo sfoo%20(s foos%20foo(t__name__t
__module__RR(((s=/usr/lib/python2.7/dist-packages/twisted/test/test_postfix.pyR
s	tPostfixTCPMapServerTestCasecBs&eZiZgZd„Zd„ZRS(cCs´tj|jƒ}tƒ}tjƒ}||_||_|j|ƒxZ|jD]O\}}|j	|ƒ|j
|jƒ|d|||jƒfƒ|jƒqPW|j
dƒdS(sÑ
        Test that I{get} and I{put} commands are responded to correctly by
        L{postfix.PostfixTCPMapServer} when its factory is an instance of
        L{postifx.PostfixTCPMapDictServerFactory}.
        sFor %r, expected %r but got %rN(RtPostfixTCPMapDictServerFactoryRRtPostfixTCPMapServertservicetfactorytmakeConnectiontchattlineReceivedRtvaluetcleart
setTimeouttNone(R	Rt	transporttprotocoltinputtexpected_output((s=/usr/lib/python2.7/dist-packages/twisted/test/test_postfix.pyt	test_chat+s			

cCs´tj|jƒ}tƒ}tjƒ}||_||_|j|ƒxZ|jD]O\}}|j	|ƒ|j
|jƒ|d|||jƒfƒ|jƒqPW|j
dƒdS(sÚ
        Test that I{get} and I{put} commands are responded to correctly by
        L{postfix.PostfixTCPMapServer} when its factory is an instance of
        L{postifx.PostfixTCPMapDeferringDictServerFactory}.
        sFor %r, expected %r but got %rN(Rt'PostfixTCPMapDeferringDictServerFactoryRRRRRRRRRRRRR(R	RRRRR ((s=/usr/lib/python2.7/dist-packages/twisted/test/test_postfix.pyttest_deferredChatCs			

(RRRRR!R#(((s=/usr/lib/python2.7/dist-packages/twisted/test/test_postfix.pyR"s	tValidcBs@eZidd6dd6Zddddddddddg
ZRS(s
ThisIs FooRs bar really is found
tbartgets&400 Command 'get' takes 1 parameters.
sget foo bars500 
tputs&400 Command 'put' takes 2 parameters.
sput foosput foo bar bazs 500 put is not implemented yet.
sput foo barsget foos200 ThisIs%20Foo
sget bars'200 %20bar%20really%20is%20found%0D%0A
sget bazs400 unknown command
(sgets&400 Command 'get' takes 1 parameters.
(sget foo bars500 
(R's&400 Command 'put' takes 2 parameters.
(sput foos&400 Command 'put' takes 2 parameters.
(sput foo bar bazs 500 put is not implemented yet.
(sput foo bars 500 put is not implemented yet.
(sget foos200 ThisIs%20Foo
(sget bars'200 %20bar%20really%20is%20found%0D%0A
(sget bazs500 
(sfoos400 unknown command
(RRRR(((s=/usr/lib/python2.7/dist-packages/twisted/test/test_postfix.pyR$\s
N((t__doc__t
twisted.trialRttwisted.protocolsRttwisted.test.proto_helpersRtTestCaseRRR$(((s=/usr/lib/python2.7/dist-packages/twisted/test/test_postfix.pyt<module>s: