#NEWLINE# def test_upload_image_raises_exception( self ) : #NEWLINE# #INDENT# params = self . _get_upload_params ( ) #NEWLINE# self . mox . StubOutWithMock ( self . session , 'call_plugin_serialized' ) #NEWLINE# self . session . call_plugin_serialized ( 'glance' , 'upload_vhd2' , ** params ) . AndRaise ( RuntimeError ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# self . assertRaises ( RuntimeError , self . store . upload_image , self . context , self . session , params . instance , 'fake_image_uuid' , [ 'fake_vdi_uuid' ] ) #NEWLINE# self . mox . VerifyAll ( )