#NEWLINE# def test_virt_stats( self ) : #NEWLINE# #INDENT# stats = self . tracker . compute_node . stats #NEWLINE# self . assertEqual ( FAKE_VIRT_STATS_COERCED , stats ) #NEWLINE# self . _fake_instance_obj ( vm_state = vm_states . ACTIVE , host = k . host ) #NEWLINE# self . tracker . update_available_resource ( self . context ) #NEWLINE# stats = self . tracker . compute_node . stats #NEWLINE# expected_stats = copy . deepcopy ( FAKE_VIRT_STATS_COERCED ) #NEWLINE# for ( k , v ) in self . tracker . stats . items ( ) : #NEWLINE# #INDENT# expected_stats [ k ] = six . text_type ( v ) #NEWLINE# #UNINDENT# self . assertEqual ( expected_stats , stats ) #NEWLINE# self . _instances = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . tracker . update_available_resource ( self . context ) #NEWLINE# stats = self . tracker . compute_node . stats #NEWLINE# self . assertEqual ( FAKE_VIRT_STATS_COERCED , stats )