<s> """<STR_LIT>""" <EOL> try : <EOL> from cStringIO import StringIO <EOL> except ImportError : <EOL> from StringIO import StringIO <EOL> import struct <EOL> from twisted . python . failure import Failure <EOL> from twisted . internet import address , task <EOL> from twisted . internet . error import CannotListenError , ConnectionDone <EOL> from twisted . trial import unittest <EOL> from twisted . names import dns <EOL> from twisted . test import proto_helpers <EOL> class RoundtripDNSTestCase ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> names = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> def testName ( self ) : <EOL> for n in self . names : <EOL> f = StringIO ( ) <EOL> dns . Name ( n ) . encode ( f ) <EOL> f . seek ( <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> result = dns . Name ( ) <EOL> result . decode ( f ) <EOL> self . assertEquals ( result . name , n ) <EOL> def testQuery ( self ) : <EOL> for n in self . names : <EOL> for dnstype in range ( <NUM_LIT:1> , <NUM_LIT> ) : <EOL> for dnscls in range ( <NUM_LIT:1> , <NUM_LIT:5> ) : <EOL> f = StringIO ( ) <EOL> dns . Query ( n , dnstype , dnscls ) . encode ( f ) <EOL> f . seek ( <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> result = dns . Query ( ) <EOL> result . decode ( f ) <EOL> self . assertEquals ( result . name . name , n ) <EOL> self . assertEquals ( result . type , dnstype ) <EOL> self . assertEquals ( result . cls , dnscls ) <EOL> def testRR ( self ) : <EOL> f = StringIO ( ) <EOL> dns . RRHeader ( "<STR_LIT>" , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT> ) . encode ( f ) <EOL> f . seek ( <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> result = dns . RRHeader ( ) <EOL> result . decode ( f ) <EOL> self . assertEquals ( str ( result . name ) , "<STR_LIT>" ) <EOL> self . assertEquals ( result . type , <NUM_LIT:3> ) <EOL> self . assertEquals ( result . cls , <NUM_LIT:4> ) <EOL> self . assertEquals ( result . ttl , <NUM_LIT> ) <EOL> def testResources ( self ) : <EOL> names = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ) <EOL> for s in names : <EOL> f = StringIO ( ) <EOL> dns . SimpleRecord ( s ) . encode ( f ) <EOL> f . seek ( <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> result = dns . SimpleRecord ( ) <EOL> result . decode ( f ) <EOL> self . assertEquals ( str ( result . name ) , s ) <EOL> def test_hashable ( self ) : <EOL> """<STR_LIT>""" <EOL> records = [ <EOL> dns . Record_NS , dns . Record_MD , dns . Record_MF , dns . Record_CNAME , <EOL> dns . Record_MB , dns . Record_MG , dns . Record_MR , dns . Record_PTR , <EOL> dns . Record_DNAME , dns . Record_A , dns . Record_SOA , dns . Record_NULL , <EOL> dns . Record_WKS , dns . Record_SRV , dns . Record_AFSDB , dns . Record_RP , <EOL> dns . Record_HINFO , dns . Record_MINFO , dns . Record_MX , dns . Record_TXT , <EOL> dns . Record_AAAA , dns . Record_A6 , dns . Record_NAPTR <EOL> ] <EOL> for k in records : <EOL> k1 , k2 = k ( ) , k ( ) <EOL> hk1 = hash ( k1 ) <EOL> hk2 = hash ( k2 ) <EOL> self . assertEquals ( hk1 , hk2 , "<STR_LIT>" % ( hk1 , hk2 , k ) ) <EOL> def test_Charstr ( self ) : <EOL> """<STR_LIT>""" <EOL> for n in self . names : <EOL> f = StringIO ( ) <EOL> dns . Charstr ( n ) . encode ( f ) <EOL> f . seek ( <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> result = dns . Charstr ( ) <EOL> result . decode ( f ) <EOL> self . assertEquals ( result . string , n ) <EOL> def test_NAPTR ( self ) : <EOL> """<STR_LIT>""" <EOL> naptrs = [ ( <NUM_LIT:100> , <NUM_LIT:10> , "<STR_LIT:u>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( <NUM_LIT:100> , <NUM_LIT:50> , "<STR_LIT:s>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" ) ] <EOL> for ( order , preference , flags , service , regexp , replacement ) in naptrs : <EOL> rin = dns . Record_NAPTR ( order , preference , flags , service , regexp , <EOL> replacement ) <EOL> e = StringIO ( ) <EOL> rin . encode ( e ) <EOL> e . seek ( <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> rout = dns . Record_NAPTR ( ) <EOL> rout . decode ( e ) <EOL> self . assertEquals ( rin . order , rout . order ) <EOL> self . assertEquals ( rin . preference , rout . preference ) <EOL> self . assertEquals ( rin . flags , rout . flags ) <EOL> self . assertEquals ( rin . service , rout . service ) <EOL> self . assertEquals ( rin . regexp , rout . regexp ) <EOL> self . assertEquals ( rin . replacement . name , rout . replacement . name ) <EOL> self . assertEquals ( rin . ttl , rout . ttl ) <EOL> class MessageTestCase ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def testEmptyMessage ( self ) : <EOL> """<STR_LIT>""" <EOL> msg = dns . Message ( ) <EOL> self . assertRaises ( EOFError , msg . fromStr , '<STR_LIT>' ) <EOL> def testEmptyQuery ( self ) : <EOL> """<STR_LIT>""" <EOL> msg = dns . Message ( ) <EOL> msg . fromStr ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT:\x00>' <EOL> '<STR_LIT:\x00>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> ) <EOL> self . assertEquals ( msg . id , <NUM_LIT> ) <EOL> self . failIf ( msg . answer , "<STR_LIT>" ) <EOL> self . assertEquals ( msg . opCode , dns . OP_QUERY ) <EOL> self . failIf ( msg . auth , "<STR_LIT>" ) <EOL> self . failIf ( msg . trunc , "<STR_LIT>" ) <EOL> self . assertEquals ( msg . queries , [ ] ) <EOL> self . assertEquals ( msg . answers , [ ] ) <EOL> self . assertEquals ( msg . authority , [ ] ) <EOL> self . assertEquals ( msg . additional , [ ] ) <EOL> def testNULL ( self ) : <EOL> bytes = '<STR_LIT>' . join ( [ chr ( i ) for i in range ( <NUM_LIT> ) ] ) <EOL> rec = dns . Record_NULL ( bytes ) <EOL> rr = dns . RRHeader ( '<STR_LIT>' , dns . NULL , payload = rec ) <EOL> msg1 = dns . Message ( ) <EOL> msg1 . answers . append ( rr ) <EOL> s = StringIO ( ) <EOL> msg1 . encode ( s ) <EOL> s . seek ( <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> msg2 = dns . Message ( ) <EOL> msg2 . decode ( s ) <EOL> self . failUnless ( isinstance ( msg2 . answers [ <NUM_LIT:0> ] . payload , dns . Record_NULL ) ) <EOL> self . assertEquals ( msg2 . answers [ <NUM_LIT:0> ] . payload . payload , bytes ) <EOL> def test_lookupRecordTypeDefault ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertIdentical ( dns . Message ( ) . lookupRecordType ( <NUM_LIT> ) , None ) <EOL> class TestController ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> """<STR_LIT>""" <EOL> self . messages = [ ] <EOL> def messageReceived ( self , msg , proto , addr ) : <EOL> """<STR_LIT>""" <EOL> self . messages . append ( ( msg , proto , addr ) ) <EOL> class DatagramProtocolTestCase ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> """<STR_LIT>""" <EOL> self . clock = task . Clock ( ) <EOL> self . controller = TestController ( ) <EOL> self . proto = dns . DNSDatagramProtocol ( self . controller ) <EOL> transport = proto_helpers . FakeDatagramTransport ( ) <EOL> self . proto . makeConnection ( transport ) <EOL> self . proto . callLater = self . clock . callLater <EOL> def test_truncatedPacket ( self ) : <EOL> """<STR_LIT>""" <EOL> self . proto . datagramReceived ( '<STR_LIT>' , <EOL> address . IPv4Address ( '<STR_LIT>' , '<STR_LIT:127.0.0.1>' , <NUM_LIT> ) ) <EOL> self . assertEquals ( self . controller . messages , [ ] ) <EOL> def test_simpleQuery ( self ) : <EOL> """<STR_LIT>""" <EOL> d = self . proto . query ( ( '<STR_LIT:127.0.0.1>' , <NUM_LIT> ) , [ dns . Query ( '<STR_LIT:foo>' ) ] ) <EOL> self . assertEquals ( len ( self . proto . liveMessages . keys ( ) ) , <NUM_LIT:1> ) <EOL> m = dns . Message ( ) <EOL> m . id = self . proto . liveMessages . items ( ) [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] <EOL> m . answers = [ dns . RRHeader ( payload = dns . Record_A ( address = '<STR_LIT>' ) ) ] <EOL> called = False <EOL> def cb ( result ) : <EOL> self . assertEquals ( result . answers [ <NUM_LIT:0> ] . payload . dottedQuad ( ) , '<STR_LIT>' ) <EOL> d . addCallback ( cb ) <EOL> self . proto . datagramReceived ( m . toStr ( ) , ( '<STR_LIT:127.0.0.1>' , <NUM_LIT> ) ) <EOL> return d <EOL> def test_queryTimeout ( self ) : <EOL> """<STR_LIT>""" <EOL> d = self . proto . query ( ( '<STR_LIT:127.0.0.1>' , <NUM_LIT> ) , [ dns . Query ( '<STR_LIT:foo>' ) ] ) <EOL> self . assertEquals ( len ( self . proto . liveMessages ) , <NUM_LIT:1> ) <EOL> self . clock . advance ( <NUM_LIT:10> ) <EOL> self . assertFailure ( d , dns . DNSQueryTimeoutError ) <EOL> self . assertEquals ( len ( self . proto . liveMessages ) , <NUM_LIT:0> ) <EOL> return d <EOL> def test_writeError ( self ) : <EOL> """<STR_LIT>""" <EOL> def writeError ( message , addr ) : <EOL> raise RuntimeError ( "<STR_LIT:bar>" ) <EOL> self . proto . transport . write = writeError <EOL> d = self . proto . query ( ( '<STR_LIT:127.0.0.1>' , <NUM_LIT> ) , [ dns . Query ( '<STR_LIT:foo>' ) ] ) <EOL> return self . assertFailure ( d , RuntimeError ) <EOL> def test_listenError ( self ) : <EOL> """<STR_LIT>""" <EOL> def startListeningError ( ) : <EOL> raise CannotListenError ( None , None , None ) <EOL> self . proto . startListening = startListeningError <EOL> self . proto . transport = None <EOL> d = self . proto . query ( ( '<STR_LIT:127.0.0.1>' , <NUM_LIT> ) , [ dns . Query ( '<STR_LIT:foo>' ) ] ) <EOL> return self . assertFailure ( d , CannotListenError ) <EOL> class TestTCPController ( TestController ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> TestController . __init__ ( self ) <EOL> self . connections = [ ] <EOL> def connectionMade ( self , proto ) : <EOL> self . connections . append ( proto ) <EOL> def connectionLost ( self , proto ) : <EOL> self . connections . remove ( proto ) <EOL> class DNSProtocolTestCase ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> """<STR_LIT>""" <EOL> self . clock = task . Clock ( ) <EOL> self . controller = TestTCPController ( ) <EOL> self . proto = dns . DNSProtocol ( self . controller ) <EOL> self . proto . makeConnection ( proto_helpers . StringTransport ( ) ) <EOL> self . proto . callLater = self . clock . callLater <EOL> def test_connectionTracking ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( self . controller . connections , [ self . proto ] ) <EOL> self . proto . connectionLost ( <EOL> Failure ( ConnectionDone ( "<STR_LIT>" ) ) ) <EOL> self . assertEqual ( self . controller . connections , [ ] ) <EOL> def test_queryTimeout ( self ) : <EOL> """<STR_LIT>""" <EOL> d = self . proto . query ( [ dns . Query ( '<STR_LIT:foo>' ) ] ) <EOL> self . assertEquals ( len ( self . proto . liveMessages ) , <NUM_LIT:1> ) <EOL> self . clock . advance ( <NUM_LIT> ) <EOL> self . assertFailure ( d , dns . DNSQueryTimeoutError ) <EOL> self . assertEquals ( len ( self . proto . liveMessages ) , <NUM_LIT:0> ) <EOL> return d <EOL> def test_simpleQuery ( self ) : <EOL> """<STR_LIT>""" <EOL> d = self . proto . query ( [ dns . Query ( '<STR_LIT:foo>' ) ] ) <EOL> self . assertEquals ( len ( self . proto . liveMessages . keys ( ) ) , <NUM_LIT:1> ) <EOL> m = dns . Message ( ) <EOL> m . id = self . proto . liveMessages . items ( ) [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] <EOL> m . answers = [ dns . RRHeader ( payload = dns . Record_A ( address = '<STR_LIT>' ) ) ] <EOL> called = False <EOL> def cb ( result ) : <EOL> self . assertEquals ( result . answers [ <NUM_LIT:0> ] . payload . dottedQuad ( ) , '<STR_LIT>' ) <EOL> d . addCallback ( cb ) <EOL> s = m . toStr ( ) <EOL> s = struct . pack ( '<STR_LIT>' , len ( s ) ) + s <EOL> self . proto . dataReceived ( s ) <EOL> return d <EOL> def test_writeError ( self ) : <EOL> """<STR_LIT>""" <EOL> def writeError ( message ) : <EOL> raise RuntimeError ( "<STR_LIT:bar>" ) <EOL> self . proto . transport . write = writeError <EOL> d = self . proto . query ( [ dns . Query ( '<STR_LIT:foo>' ) ] ) <EOL> return self . assertFailure ( d , RuntimeError ) <EOL> class ReprTests ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def test_ns ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_NS ( '<STR_LIT>' , <NUM_LIT> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_md ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_MD ( '<STR_LIT>' , <NUM_LIT> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_mf ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_MF ( '<STR_LIT>' , <NUM_LIT> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_cname ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_CNAME ( '<STR_LIT>' , <NUM_LIT> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_mb ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_MB ( '<STR_LIT>' , <NUM_LIT> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_mg ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_MG ( '<STR_LIT>' , <NUM_LIT> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_mr ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_MR ( '<STR_LIT>' , <NUM_LIT> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_ptr ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_PTR ( '<STR_LIT>' , <NUM_LIT> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_dname ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_DNAME ( '<STR_LIT>' , <NUM_LIT> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_a ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_A ( '<STR_LIT>' , <NUM_LIT> ) ) , <EOL> '<STR_LIT>' ) <EOL> def test_soa ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_SOA ( mname = '<STR_LIT>' , rname = '<STR_LIT>' , serial = <NUM_LIT> , <EOL> refresh = <NUM_LIT> , retry = <NUM_LIT> , expire = <NUM_LIT:10> , <EOL> minimum = <NUM_LIT:11> , ttl = <NUM_LIT:12> ) ) , <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> def test_null ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_NULL ( '<STR_LIT>' , <NUM_LIT> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_wks ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_WKS ( '<STR_LIT>' , <NUM_LIT:7> , ttl = <NUM_LIT:8> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_aaaa ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_AAAA ( '<STR_LIT>' , ttl = <NUM_LIT:10> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_a6 ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_A6 ( <NUM_LIT:0> , '<STR_LIT>' , '<STR_LIT>' , ttl = <NUM_LIT:10> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_srv ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_SRV ( <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , '<STR_LIT>' , <NUM_LIT:4> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_naptr ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_NAPTR ( <NUM_LIT:5> , <NUM_LIT:9> , "<STR_LIT:S>" , "<STR_LIT:http>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:3> ) ) , <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> def test_afsdb ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_AFSDB ( <NUM_LIT:3> , '<STR_LIT>' , <NUM_LIT:5> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_rp ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_RP ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:3> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_hinfo ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_HINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:12> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_minfo ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_MINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:15> ) ) , <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> def test_mx ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_MX ( <NUM_LIT> , '<STR_LIT>' , <NUM_LIT:2> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_txt ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_TXT ( "<STR_LIT:foo>" , "<STR_LIT:bar>" , ttl = <NUM_LIT:15> ) ) , <EOL> "<STR_LIT>" ) <EOL> def test_spf ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> repr ( dns . Record_SPF ( "<STR_LIT:foo>" , "<STR_LIT:bar>" , ttl = <NUM_LIT:15> ) ) , <EOL> "<STR_LIT>" ) <EOL> class _Equal ( object ) : <EOL> """<STR_LIT>""" <EOL> def __eq__ ( self , other ) : <EOL> return True <EOL> def __ne__ ( self , other ) : <EOL> return False <EOL> class _NotEqual ( object ) : <EOL> """<STR_LIT>""" <EOL> def __eq__ ( self , other ) : <EOL> return False <EOL> def __ne__ ( self , other ) : <EOL> return True <EOL> class EqualityTests ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def _equalityTest ( self , firstValueOne , secondValueOne , valueTwo ) : <EOL> """<STR_LIT>""" <EOL> self . assertTrue ( firstValueOne == firstValueOne ) <EOL> self . assertTrue ( firstValueOne == secondValueOne ) <EOL> self . assertFalse ( firstValueOne == valueTwo ) <EOL> self . assertFalse ( firstValueOne != firstValueOne ) <EOL> self . assertFalse ( firstValueOne != secondValueOne ) <EOL> self . assertTrue ( firstValueOne != valueTwo ) <EOL> self . assertTrue ( firstValueOne == _Equal ( ) ) <EOL> self . assertFalse ( firstValueOne != _Equal ( ) ) <EOL> self . assertFalse ( firstValueOne == _NotEqual ( ) ) <EOL> self . assertTrue ( firstValueOne != _NotEqual ( ) ) <EOL> def _simpleEqualityTest ( self , cls ) : <EOL> self . _equalityTest ( <EOL> cls ( '<STR_LIT>' , <NUM_LIT> ) , <EOL> cls ( '<STR_LIT>' , <NUM_LIT> ) , <EOL> cls ( '<STR_LIT>' , <NUM_LIT> ) ) <EOL> self . _equalityTest ( <EOL> cls ( '<STR_LIT>' , <NUM_LIT> ) , <EOL> cls ( '<STR_LIT>' , <NUM_LIT> ) , <EOL> cls ( '<STR_LIT>' , <NUM_LIT> ) ) <EOL> def test_rrheader ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . RRHeader ( '<STR_LIT>' , payload = dns . Record_A ( '<STR_LIT>' ) ) , <EOL> dns . RRHeader ( '<STR_LIT>' , payload = dns . Record_A ( '<STR_LIT>' ) ) , <EOL> dns . RRHeader ( '<STR_LIT>' , payload = dns . Record_A ( '<STR_LIT>' ) ) ) <EOL> self . _equalityTest ( <EOL> dns . RRHeader ( '<STR_LIT>' , payload = dns . Record_A ( '<STR_LIT>' ) ) , <EOL> dns . RRHeader ( '<STR_LIT>' , payload = dns . Record_A ( '<STR_LIT>' ) ) , <EOL> dns . RRHeader ( '<STR_LIT>' , payload = dns . Record_A ( '<STR_LIT>' ) ) ) <EOL> self . _equalityTest ( <EOL> dns . RRHeader ( '<STR_LIT>' , dns . A ) , <EOL> dns . RRHeader ( '<STR_LIT>' , dns . A ) , <EOL> dns . RRHeader ( '<STR_LIT>' , dns . MX ) ) <EOL> self . _equalityTest ( <EOL> dns . RRHeader ( '<STR_LIT>' , cls = dns . IN , payload = dns . Record_A ( '<STR_LIT>' ) ) , <EOL> dns . RRHeader ( '<STR_LIT>' , cls = dns . IN , payload = dns . Record_A ( '<STR_LIT>' ) ) , <EOL> dns . RRHeader ( '<STR_LIT>' , cls = dns . CS , payload = dns . Record_A ( '<STR_LIT>' ) ) ) <EOL> self . _equalityTest ( <EOL> dns . RRHeader ( '<STR_LIT>' , ttl = <NUM_LIT> , payload = dns . Record_A ( '<STR_LIT>' ) ) , <EOL> dns . RRHeader ( '<STR_LIT>' , ttl = <NUM_LIT> , payload = dns . Record_A ( '<STR_LIT>' ) ) , <EOL> dns . RRHeader ( '<STR_LIT>' , ttl = <NUM_LIT> , payload = dns . Record_A ( '<STR_LIT>' ) ) ) <EOL> self . _equalityTest ( <EOL> dns . RRHeader ( '<STR_LIT>' , auth = <NUM_LIT:1> , payload = dns . Record_A ( '<STR_LIT>' ) ) , <EOL> dns . RRHeader ( '<STR_LIT>' , auth = <NUM_LIT:1> , payload = dns . Record_A ( '<STR_LIT>' ) ) , <EOL> dns . RRHeader ( '<STR_LIT>' , auth = <NUM_LIT:0> , payload = dns . Record_A ( '<STR_LIT>' ) ) ) <EOL> def test_ns ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _simpleEqualityTest ( dns . Record_NS ) <EOL> def test_md ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _simpleEqualityTest ( dns . Record_MD ) <EOL> def test_mf ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _simpleEqualityTest ( dns . Record_MF ) <EOL> def test_cname ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _simpleEqualityTest ( dns . Record_CNAME ) <EOL> def test_mb ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _simpleEqualityTest ( dns . Record_MB ) <EOL> def test_mg ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _simpleEqualityTest ( dns . Record_MG ) <EOL> def test_mr ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _simpleEqualityTest ( dns . Record_MR ) <EOL> def test_ptr ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _simpleEqualityTest ( dns . Record_PTR ) <EOL> def test_dname ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _simpleEqualityTest ( dns . Record_DNAME ) <EOL> def test_a ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_A ( '<STR_LIT>' , <NUM_LIT:5> ) , <EOL> dns . Record_A ( '<STR_LIT>' , <NUM_LIT:5> ) , <EOL> dns . Record_A ( '<STR_LIT>' , <NUM_LIT:6> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_A ( '<STR_LIT>' , <NUM_LIT:5> ) , <EOL> dns . Record_A ( '<STR_LIT>' , <NUM_LIT:5> ) , <EOL> dns . Record_A ( '<STR_LIT>' , <NUM_LIT:5> ) ) <EOL> def test_soa ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:1> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT:1> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:1> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:1> , <NUM_LIT:20> , <NUM_LIT:30> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:1> , <NUM_LIT:30> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> ) , <EOL> dns . Record_SOA ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:1> ) ) <EOL> def test_null ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_NULL ( '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_NULL ( '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_NULL ( '<STR_LIT>' , <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_NULL ( '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_NULL ( '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_NULL ( '<STR_LIT>' , <NUM_LIT:100> ) ) <EOL> def test_wks ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_WKS ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT:foo>' , <NUM_LIT:2> ) , <EOL> dns . Record_WKS ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT:foo>' , <NUM_LIT:2> ) , <EOL> dns . Record_WKS ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT:foo>' , <NUM_LIT:2> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_WKS ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT:foo>' , <NUM_LIT:2> ) , <EOL> dns . Record_WKS ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT:foo>' , <NUM_LIT:2> ) , <EOL> dns . Record_WKS ( '<STR_LIT>' , <NUM_LIT:100> , '<STR_LIT:foo>' , <NUM_LIT:2> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_WKS ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT:foo>' , <NUM_LIT:2> ) , <EOL> dns . Record_WKS ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT:foo>' , <NUM_LIT:2> ) , <EOL> dns . Record_WKS ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT:bar>' , <NUM_LIT:2> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_WKS ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT:foo>' , <NUM_LIT:2> ) , <EOL> dns . Record_WKS ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT:foo>' , <NUM_LIT:2> ) , <EOL> dns . Record_WKS ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT:foo>' , <NUM_LIT:200> ) ) <EOL> def test_aaaa ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_AAAA ( '<STR_LIT>' , <NUM_LIT:1> ) , <EOL> dns . Record_AAAA ( '<STR_LIT>' , <NUM_LIT:1> ) , <EOL> dns . Record_AAAA ( '<STR_LIT>' , <NUM_LIT:1> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_AAAA ( '<STR_LIT>' , <NUM_LIT:1> ) , <EOL> dns . Record_AAAA ( '<STR_LIT>' , <NUM_LIT:1> ) , <EOL> dns . Record_AAAA ( '<STR_LIT>' , <NUM_LIT:10> ) ) <EOL> def test_a6 ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_A6 ( <NUM_LIT:16> , '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_A6 ( <NUM_LIT:16> , '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_A6 ( <NUM_LIT:32> , '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_A6 ( <NUM_LIT:16> , '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_A6 ( <NUM_LIT:16> , '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_A6 ( <NUM_LIT:16> , '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_A6 ( <NUM_LIT:16> , '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_A6 ( <NUM_LIT:16> , '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_A6 ( <NUM_LIT:16> , '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_A6 ( <NUM_LIT:16> , '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_A6 ( <NUM_LIT:16> , '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_A6 ( <NUM_LIT:16> , '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:100> ) ) <EOL> def test_srv ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) , <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) , <EOL> dns . Record_SRV ( <NUM_LIT:100> , <NUM_LIT:20> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) , <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) , <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:200> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) , <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) , <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT> , '<STR_LIT>' , <NUM_LIT> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) , <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) , <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) , <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) , <EOL> dns . Record_SRV ( <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:30> , '<STR_LIT>' , <NUM_LIT> ) ) <EOL> def test_naptr ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:2> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:3> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:p>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT:http>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:12> ) , <EOL> dns . Record_NAPTR ( <NUM_LIT:1> , <NUM_LIT:2> , "<STR_LIT:u>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <NUM_LIT:5> ) ) <EOL> def test_afsdb ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_AFSDB ( <NUM_LIT:1> , '<STR_LIT>' , <NUM_LIT:2> ) , <EOL> dns . Record_AFSDB ( <NUM_LIT:1> , '<STR_LIT>' , <NUM_LIT:2> ) , <EOL> dns . Record_AFSDB ( <NUM_LIT:2> , '<STR_LIT>' , <NUM_LIT:2> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_AFSDB ( <NUM_LIT:1> , '<STR_LIT>' , <NUM_LIT:2> ) , <EOL> dns . Record_AFSDB ( <NUM_LIT:1> , '<STR_LIT>' , <NUM_LIT:2> ) , <EOL> dns . Record_AFSDB ( <NUM_LIT:1> , '<STR_LIT>' , <NUM_LIT:2> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_AFSDB ( <NUM_LIT:1> , '<STR_LIT>' , <NUM_LIT:2> ) , <EOL> dns . Record_AFSDB ( <NUM_LIT:1> , '<STR_LIT>' , <NUM_LIT:2> ) , <EOL> dns . Record_AFSDB ( <NUM_LIT:1> , '<STR_LIT>' , <NUM_LIT:3> ) ) <EOL> def test_rp ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_RP ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_RP ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_RP ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_RP ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_RP ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_RP ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_RP ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_RP ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_RP ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:100> ) ) <EOL> def test_hinfo ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_HINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_HINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_HINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_HINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_HINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_HINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_HINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_HINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_HINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:100> ) ) <EOL> def test_minfo ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_MINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_MINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_MINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_MINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_MINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_MINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_MINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_MINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> dns . Record_MINFO ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:100> ) ) <EOL> def test_mx ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_MX ( <NUM_LIT:10> , '<STR_LIT>' , <NUM_LIT:20> ) , <EOL> dns . Record_MX ( <NUM_LIT:10> , '<STR_LIT>' , <NUM_LIT:20> ) , <EOL> dns . Record_MX ( <NUM_LIT:100> , '<STR_LIT>' , <NUM_LIT:20> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_MX ( <NUM_LIT:10> , '<STR_LIT>' , <NUM_LIT:20> ) , <EOL> dns . Record_MX ( <NUM_LIT:10> , '<STR_LIT>' , <NUM_LIT:20> ) , <EOL> dns . Record_MX ( <NUM_LIT:10> , '<STR_LIT>' , <NUM_LIT:20> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_MX ( <NUM_LIT:10> , '<STR_LIT>' , <NUM_LIT:20> ) , <EOL> dns . Record_MX ( <NUM_LIT:10> , '<STR_LIT>' , <NUM_LIT:20> ) , <EOL> dns . Record_MX ( <NUM_LIT:10> , '<STR_LIT>' , <NUM_LIT:200> ) ) <EOL> def test_txt ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_TXT ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:10> ) , <EOL> dns . Record_TXT ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:10> ) , <EOL> dns . Record_TXT ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , '<STR_LIT>' , ttl = <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_TXT ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:10> ) , <EOL> dns . Record_TXT ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:10> ) , <EOL> dns . Record_TXT ( '<STR_LIT:bar>' , '<STR_LIT:foo>' , ttl = <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_TXT ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:10> ) , <EOL> dns . Record_TXT ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:10> ) , <EOL> dns . Record_TXT ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:100> ) ) <EOL> def test_spf ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _equalityTest ( <EOL> dns . Record_SPF ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:10> ) , <EOL> dns . Record_SPF ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:10> ) , <EOL> dns . Record_SPF ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , '<STR_LIT>' , ttl = <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_SPF ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:10> ) , <EOL> dns . Record_SPF ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:10> ) , <EOL> dns . Record_SPF ( '<STR_LIT:bar>' , '<STR_LIT:foo>' , ttl = <NUM_LIT:10> ) ) <EOL> self . _equalityTest ( <EOL> dns . Record_SPF ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:10> ) , <EOL> dns . Record_SPF ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:10> ) , <EOL> dns . Record_SPF ( '<STR_LIT:foo>' , '<STR_LIT:bar>' , ttl = <NUM_LIT:100> ) ) </s>
