#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . neutron : ( 'network_update' , 'network_get' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_network_update_post_exception( self ) : #NEWLINE# #INDENT# network = self . networks . first ( ) #NEWLINE# api . neutron . network_update ( IsA ( http . HttpRequest ) , network . id , name = network . name , admin_state_up = network . admin_state_up ) . AndRaise ( self . exceptions . neutron ) #NEWLINE# api . neutron . network_get ( IsA ( http . HttpRequest ) , network . id ) . AndReturn ( network ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# form_data = { #NEWLINE# #INDENT# 'network_id' : network . id , #NEWLINE# 'name' : network . name , #NEWLINE# 'admin_state' : network . admin_state_up , #NEWLINE# 'tenant_id' : self . tenant_id , #NEWLINE# #UNINDENT# } #NEWLINE# url = reverse ( 'horizon:project:networks:update' , args = [ network . id ] ) #NEWLINE# res = self . client . post ( url , form_data ) #NEWLINE# self . assertRedirectsNoFollow ( res , INDEX_URL )