#NEWLINE# def test_usages_multi_nets_subnets_sums( self ) : #NEWLINE# #INDENT# with self . network ( name = 'net1' ) as n1 : #NEWLINE# #INDENT# with self . subnet ( network = n1 ) as subnet1_1 , self . subnet ( cidr = '40.0.0.0/24' , network = n1 ) as subnet1_2 : #NEWLINE# #INDENT# with self . port ( subnet = subnet1_1 ) , self . port ( subnet = subnet1_2 ) , self . port ( subnet = network ) : #NEWLINE# #INDENT# request = self . new_list_request ( API_RESOURCE ) #NEWLINE# response = self . deserialize ( self . fmt , request . get_response ( self . ext_api ) ) #NEWLINE# self . assertIn ( IP_AVAILS_KEY , response ) #NEWLINE# self . assertEqual ( 1 , len ( response [ IP_AVAILS_KEY ] ) ) #NEWLINE# self . _validate_from_availabilities ( response [ IP_AVAILS_KEY ] , n1 , 3 , 506 ) #NEWLINE# network = n1 [ 'network' ] #NEWLINE# request = self . new_show_request ( API_RESOURCE , network [ 'id' ] ) #NEWLINE# response = self . deserialize ( self . fmt , request . get_response ( self . ext_api ) ) #NEWLINE# self . assertIn ( IP_AVAIL_KEY , response ) #NEWLINE# self . _validate_availability ( network , response [ IP_AVAIL_KEY ] , 3 , 506 )