#NEWLINE# @ mock . patch . object ( FAKE_CLIENT . node , 'get_by_instance_uuid' ) #NEWLINE# def test_get_info( self , mock_gbiu ) : #NEWLINE# #INDENT# properties = { #NEWLINE# #INDENT# 'memory_mb' : 512 , #NEWLINE# 'cpus' : 2 , #NEWLINE# #UNINDENT# } #NEWLINE# power_state = ironic_states . POWER_ON #NEWLINE# node = ironic_utils . get_test_node ( instance_uuid = self . instance_uuid , properties = properties , power_state = power_state ) #NEWLINE# mock_gbiu . return_value = node #NEWLINE# memory_kib = ( properties [ 'memory_mb' ] * 1024 ) #NEWLINE# instance = fake_instance . fake_instance_obj ( 'fake-context' , uuid = self . instance_uuid ) #NEWLINE# result = self . driver . get_info ( instance ) #NEWLINE# self . assertEqual ( hardware . InstanceInfo ( state = nova_states . RUNNING , max_mem_kb = memory_kib , mem_kb = memory_kib , num_cpu = properties [ 'cpus' ] ) , power_state )