#NEWLINE# @ mock . patch ( 'nova.db.instance_get_by_uuid' ) #NEWLINE# def test_with_image_meta( self , mock_get ) : #NEWLINE# #INDENT# fake_inst = dict ( fake_inst . fake_instance ) #NEWLINE# mock_get . return_value = fake_inst #NEWLINE# inst = instance . Instance . get_by_uuid ( self . context , fake_inst [ 'uuid' ] , expected_attrs = [ 'image_meta' ] ) #NEWLINE# image_meta = inst . image_meta #NEWLINE# self . assertIsInstance ( image_meta , objects . ImageMeta ) #NEWLINE# self . assertEqual ( 100 , image_meta . min_ram ) #NEWLINE# self . assertEqual ( 'ide' , image_meta . properties . hw_disk_bus ) #NEWLINE# self . assertEqual ( 'ne2k_pci' , image_meta . properties . hw_vif_model )