#NEWLINE# @ mock . patch . object ( objects . Instance , 'get_by_uuid' ) #NEWLINE# def test_load_generic( self , mock_get ) : #NEWLINE# #INDENT# inst2 = instance . Instance ( metadata = { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# #UNINDENT# } ) #NEWLINE# mock_get . return_value = inst2 #NEWLINE# inst = instance . Instance ( context = inst . context , uuid = uuids . instance ) #NEWLINE# inst . metadata