#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . keystone : ( 'domain_list' , 'domain_delete' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_delete_domain( self ) : #NEWLINE# #INDENT# domain = self . domains . get ( id = '2' ) #NEWLINE# api . keystone . domain_list ( IgnoreArg ( ) ) . AndReturn ( self . domains . list ( ) ) #NEWLINE# api . keystone . domain_delete ( IgnoreArg ( ) , domain . id ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# formData = { #NEWLINE# #INDENT# 'action' : ( 'domains__delete__%s' % domain . id ) , #NEWLINE# #UNINDENT# } #NEWLINE# res = self . client . post ( DOMAINS_INDEX_URL , formData ) #NEWLINE# self . assertRedirectsNoFollow ( res , DOMAINS_INDEX_URL )