#NEWLINE# def test_getting_default_nic_information_for_node( self ) : #NEWLINE# #INDENT# cluster = self . env . create_cluster ( api = True ) #NEWLINE# macs = ( self . env . generate_random_mac ( ) , self . env . generate_random_mac ( ) ) #NEWLINE# meta = self . env . default_metadata ( ) #NEWLINE# self . env . set_interfaces_in_meta ( meta , [ { #NEWLINE# #INDENT# 'name' : 'eth0' , #NEWLINE# 'mac' : macs [ 0 ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'name' : 'eth1' , #NEWLINE# 'mac' : macs [ 1 ] , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# node = self . env . create_node ( api = True , meta = meta , mac = macs [ 0 ] , cluster_id = cluster [ 'id' ] ) #NEWLINE# resp = self . app . get ( reverse ( 'NodeNICsDefaultHandler' , kwargs = { #NEWLINE# #INDENT# 'node_id' : node [ 'id' ] , #NEWLINE# #UNINDENT# } ) , headers = self . default_headers ) #NEWLINE# resp_macs = map ( ( lambda interface : interface [ 'mac' ] ) , resp . json_body ) #NEWLINE# self . assertEqual ( resp . status_code , 200 ) #NEWLINE# self . assertItemsEqual ( macs , resp_macs )