#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . neutron : ( 'network_get' , 'subnet_create' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_v6subnet_create_post( self ) : #NEWLINE# #INDENT# network = self . networks . get ( name = 'v6_net1' ) #NEWLINE# subnet = self . subnets . get ( name = 'v6_subnet1' ) #NEWLINE# api . neutron . network_get ( IsA ( http . HttpRequest ) , network . id ) . AndReturn ( network ) #NEWLINE# api . neutron . subnet_create ( IsA ( http . HttpRequest ) , network_id = network . id , name = subnet . name , cidr = subnet . cidr , ip_version = subnet . ip_version , gateway_ip = subnet . gateway_ip , enable_dhcp = subnet . enable_dhcp , allocation_pools = subnet . allocation_pools ) . AndReturn ( subnet ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# form_data = form_data_subnet ( subnet ) #NEWLINE# url = reverse ( 'horizon:project:networks:addsubnet' , args = [ subnet . network_id ] ) #NEWLINE# res = self . client . post ( url , form_data ) #NEWLINE# self . assertNoFormErrors ( res ) #NEWLINE# redir_url = reverse ( 'horizon:project:networks:detail' , args = [ form_data . network_id ] ) #NEWLINE# self . assertRedirectsNoFollow ( res , redir_url )