#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# cinder : ( 'volume_reset_state' , 'volume_get' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_update_volume_status( self ) : #NEWLINE# #INDENT# volume = self . volumes . first ( ) #NEWLINE# formData = { #NEWLINE# #INDENT# 'status' : 'error' , #NEWLINE# #UNINDENT# } #NEWLINE# cinder . volume_get ( IsA ( http . HttpRequest ) , volume . id ) . AndReturn ( volume ) #NEWLINE# cinder . volume_reset_state ( IsA ( http . HttpRequest ) , volume . id , volume [ 'status' ] ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# res = self . client . post ( reverse ( 'horizon:admin:volumes:volumes:update_status' , args = ( volume . id , ) ) , formData ) #NEWLINE# self . assertNoFormErrors ( res )