#NEWLINE# def test_usages_query_network_name( self ) : #NEWLINE# #INDENT# test_name = 'net_name_1' #NEWLINE# with self . network ( name = test_name ) as net : #NEWLINE# #INDENT# with self . subnet ( network = net ) : #NEWLINE# #INDENT# params = ( 'network_name=%s' % test_name ) #NEWLINE# request = self . new_list_request ( API_RESOURCE , params = params ) #NEWLINE# response = self . deserialize ( net . 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 ] , net , 0 ) #NEWLINE# params = 'network_name=clearly-wont-match' #NEWLINE# request = self . new_list_request ( API_RESOURCE , params = params ) #NEWLINE# response = self . deserialize ( self . fmt , request . get_response ( self . ext_api ) ) #NEWLINE# self . assertEqual ( 0 , len ( response [ IP_AVAILS_KEY ] ) )