Current Path : /usr/lib/python2.7/dist-packages/twisted/test/ |
Current File : //usr/lib/python2.7/dist-packages/twisted/test/test_socks.pyc |
ó ê=Nc @ sõ d Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z m Z m Z d d l m Z d d l m Z d e j f d „ ƒ YZ d d d „ ƒ YZ d e j f d „ ƒ YZ d e j f d „ ƒ YZ d e j f d „ ƒ YZ d S( s_ Tests for L{twisted.protocol.socks}, an implementation of the SOCKSv4 and SOCKSv4a protocols. iÿÿÿÿN( t unittest( t proto_helpers( t defert addresst reactor( t DNSLookupError( t sockst StringTCPTransportc B s/ e Z e Z d Z d „ Z d „ Z d „ Z RS( c C s | j S( N( t peer( t self( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_socks.pyt getPeer s c C s t j d d d ƒ S( Nt TCPs 2.3.4.5i* ( R t IPv4Address( R ( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_socks.pyt getHost s c C s t | _ d S( N( t Truet stringTCPTransport_closing( R ( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_socks.pyt loseConnection s N( t __name__t __module__t FalseR t NoneR R R R ( ( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_socks.pyR s t FakeResolverReactorc B s e Z d Z d „ Z d „ Z RS( sP Bare-bones reactor with deterministic behavior for the resolve method. c C s | | _ d S( sà @type names: C{dict} containing C{str} keys and C{str} values. @param names: A hostname to IP address mapping. The IP addresses are stringified dotted quads. N( t names( R R ( ( s; /usr/lib/python2.7/dist-packages/twisted/test/test_socks.pyt __init__% s c C sD y t j | j | ƒ SWn% t k r? t j t d | ƒ ƒ SXd S( sQ Resolve a hostname by looking it up in the C{names} dictionary. s"