#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . neutron : ( 'subnet_modify' , 'subnet_get' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_subnet_update_post( self ) : #NEWLINE# #INDENT# subnet = self . subnets . first ( ) #NEWLINE# api . neutron . subnet_get ( IsA ( http . HttpRequest ) , subnet . id ) . AndReturn ( subnet ) #NEWLINE# api . neutron . subnet_get ( IsA ( http . HttpRequest ) , subnet . id ) . AndReturn ( subnet ) #NEWLINE# api . neutron . subnet_modify ( IsA ( http . HttpRequest ) , subnet . id , name = subnet . name , enable_dhcp = subnet . enable_dhcp , dns_nameservers = [ ] , host_routes = [ ] ) . AndReturn ( subnet ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# form_data = tests . form_data_subnet ( subnet , allocation_pools = [ ] ) #NEWLINE# url = reverse ( 'horizon:admin:networks:editsubnet' , args = [ subnet . network_id , subnet . id ] ) #NEWLINE# res = self . client . post ( url , form_data ) #NEWLINE# redir_url = reverse ( 'horizon:admin:networks:detail' , args = [ subnet . network_id ] ) #NEWLINE# self . assertRedirectsNoFollow ( res , redir_url )