#NEWLINE# def test_vsa_volume_delete_nonavail_volume( self ) : #NEWLINE# #INDENT# ' Check volume deleton in different states. ' #NEWLINE# volume_param = self . _default_volume_param ( ) #NEWLINE# volume_ref = self . volume_api . create ( self . context , ** volume_param ) #NEWLINE# self . volume_api . update ( self . context , volume_ref [ 'id' ] , { #NEWLINE# #INDENT# 'status' : 'in-use' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertRaises ( exception . ApiError , self . volume_api . delete , self . context , volume_ref [ 'id' ] )