#NEWLINE# def test_inet6( self ) : #NEWLINE# #INDENT# config = { #NEWLINE# #INDENT# 'name' : '' , #NEWLINE# 'host' : '::1' , #NEWLINE# 'port' : 0 , #NEWLINE# 'family' : 'AF_INET6' , #NEWLINE# #UNINDENT# } #NEWLINE# sock = CircusSocket . load_from_config ( config ) #NEWLINE# self . assertEqual ( sock . host , config [ 'host' ] ) #NEWLINE# self . assertEqual ( sock . port , config [ 'port' ] ) #NEWLINE# sock . setsockopt = mock . Mock ( ) #NEWLINE# try : #NEWLINE# #INDENT# sock . bind_and_listen ( ) #NEWLINE# self . assertNotEqual ( sock . port , 0 ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# sock . close ( )