Current Path : /usr/lib/python2.7/dist-packages/twisted/test/ |
Current File : //usr/lib/python2.7/dist-packages/twisted/test/test_ident.pyc |
ó ê=Nc @ s@ d Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d e j f d „ ƒ YZ d e j f d „ ƒ YZ d e j f d „ ƒ YZ d e f d „ ƒ YZ d e j f d „ ƒ YZ e j d d ƒ d d k rd Z d Z n d Z d Z d e j f d „ ƒ YZ d S( s0 Test cases for twisted.protocols.ident module. iÿÿÿÿN( t ident( t failure( t error( t defer( t unittest( t StringTransportt ClassParserTestCasec B sD e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s* Test parsing of ident responses. c C s t j ƒ | _ d S( s6 Create a ident client used in tests. N( R t IdentClientt client( t self( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_ident.pyt setUp s c C sK t j ƒ } | j j j | d d f ƒ | j j d ƒ | j | t j ƒ S( sX 'UNKNOWN-ERROR' error should map to the L{ident.IdentError} exception. i{ iÈ s 123, 456 : ERROR : UNKNOWN-ERROR( R t DeferredR t queriest appendt lineReceivedt assertFailureR t IdentError( R t d( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_ident.pyt test_indentError! s c C sK t j ƒ } | j j j | d d f ƒ | j j d ƒ | j | t j ƒ S( sN 'NO-USER' error should map to the L{ident.NoUser} exception. iê iÈ s 234, 456 : ERROR : NO-USER( R R R R R R R R t NoUser( R R ( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_ident.pyt test_noUSerError+ s c C sK t j ƒ } | j j j | d d f ƒ | j j d ƒ | j | t j ƒ S( sX 'INVALID-PORT' error should map to the L{ident.InvalidPort} exception. iY i7 s 345, 567 : ERROR : INVALID-PORT( R R R R R R R R t InvalidPort( R R ( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_ident.pyt test_invalidPortError5 s c C sK t j ƒ } | j j j | d d f ƒ | j j d ƒ | j | t j ƒ S( sV 'HIDDEN-USER' error should map to the L{ident.HiddenUser} exception. i7 i s 567, 789 : ERROR : HIDDEN-USER( R R R R R R R R t HiddenUser( R R ( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_ident.pyt test_hiddenUserError? s c C sZ t j ƒ } | j j j | d d f ƒ | j j t j t j ƒ ƒ ƒ | j | t j ƒ S( sy A pending query which failed because of a ConnectionLost should receive an L{ident.IdentError}. iý i° ( R R R R R t connectionLostR t FailureR t ConnectionLostR R R ( R R ( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_ident.pyt test_lostConnectionI s ( t __name__t __module__t __doc__R R R R R R ( ( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_ident.pyR s t TestIdentServerc B s e Z d „ Z RS( c C s | j S( N( t resultValue( R t serverAddresst clientAddress( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_ident.pyt lookupV s ( R R R$ ( ( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_ident.pyR U s t TestErrorIdentServerc B s e Z d „ Z RS( c C s | j ƒ ‚ d S( N( t exceptionType( R R"