#NEWLINE# def testComplex( self ) : #NEWLINE# #INDENT# s = 'sip:user:pass@hosta:123;transport=udp;user=phone;method=foo;ttl=12;maddr=1.2.3.4;blah;goo=bar?a=b&c=d' #NEWLINE# url = sip . parseURL ( s ) #NEWLINE# for ( k , v ) in [ ( 'username' , 'user' ) , ( 'password' , 'pass' ) , ( 'host' , 'hosta' ) , ( 'port' , 123 ) , ( 'transport' , 'udp' ) , ( 'usertype' , 'phone' ) , ( 'method' , 'foo' ) , ( 'ttl' , 12 ) , ( 'maddr' , '1.2.3.4' ) , ( 'other' , [ 'blah' , 'goo=bar' ] ) , ( 'headers' , { #NEWLINE# #INDENT# 'a' : 'b' , #NEWLINE# 'c' : 'd' , #NEWLINE# #UNINDENT# } ) ] : #NEWLINE# #INDENT# self . assertEquals ( getattr ( v , k ) , v )