#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . cinder : ( 'volume_type_list_with_qos_associations' , 'qos_spec_list' , 'qos_spec_delete' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_delete_qos_spec( self ) : #NEWLINE# #INDENT# qos_spec = self . cinder_qos_specs . first ( ) #NEWLINE# formData = { #NEWLINE# #INDENT# 'action' : ( 'qos_specs__delete__%s' % qos_spec . id ) , #NEWLINE# #UNINDENT# } #NEWLINE# api . cinder . volume_type_list_with_qos_associations ( IsA ( http . HttpRequest ) ) . AndReturn ( self . volume_types . list ( ) ) #NEWLINE# api . cinder . qos_spec_list ( IsA ( http . HttpRequest ) ) . AndReturn ( self . cinder_qos_specs . list ( ) ) #NEWLINE# api . cinder . qos_spec_delete ( IsA ( http . HttpRequest ) , str ( qos_spec . id ) ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# res = self . client . post ( reverse ( 'horizon:admin:volumes:volume_types_tab' ) , formData ) #NEWLINE# redirect = reverse ( 'horizon:admin:volumes:volume_types_tab' ) #NEWLINE# self . assertNoFormErrors ( res ) #NEWLINE# self . assertRedirectsNoFollow ( res , redirect ) #NEWLINE# self . assertMessageCount ( success = 1 )