#NEWLINE# @ mock . patch . object ( FAKE_IRONIC_CLIENT . node , 'list' ) #NEWLINE# def test_index_ironic_missing_properties( self , mock_list ) : #NEWLINE# #INDENT# properties = { #NEWLINE# #INDENT# 'cpus' : 2 , #NEWLINE# #UNINDENT# } #NEWLINE# node = ironic_utils . get_test_node ( properties = properties ) #NEWLINE# mock_list . return_value = [ properties ] #NEWLINE# res_dict = self . controller . index ( self . request ) #NEWLINE# expected_output = { #NEWLINE# #INDENT# 'nodes' : [ { #NEWLINE# #INDENT# 'memory_mb' : 0 , #NEWLINE# 'host' : 'IRONIC MANAGED' , #NEWLINE# 'disk_gb' : 0 , #NEWLINE# 'interfaces' : [ ] , #NEWLINE# 'task_state' : None , #NEWLINE# 'id' : node . uuid , #NEWLINE# 'cpus' : properties [ 'cpus' ] , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( expected_output , res_dict ) #NEWLINE# mock_list . assert_called_once_with ( detail = True )