#NEWLINE# @ mock . patch . object ( instance_mapping . InstanceMapping , '_get_by_instance_uuid_from_db' ) #NEWLINE# def test_get_by_instance_uuid( self , uuid_from_db ) : #NEWLINE# #INDENT# db_mapping = get_db_mapping ( ) #NEWLINE# uuid_from_db . return_value = db_mapping #NEWLINE# mapping_obj = objects . InstanceMapping ( ) . get_by_instance_uuid ( self . context , db_mapping [ 'instance_uuid' ] ) #NEWLINE# uuid_from_db . assert_called_once_with ( self . context , db_mapping [ 'instance_uuid' ] ) #NEWLINE# self . compare_obj ( mapping_obj , db_mapping , subs = { #NEWLINE# #INDENT# 'cell_mapping' : 'cell_id' , #NEWLINE# #UNINDENT# } , comparators = { #NEWLINE# #INDENT# 'cell_mapping' : self . _check_cell_map_value , #NEWLINE# #UNINDENT# } )