#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . neutron : ( 'subnet_update' , 'subnet_get' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_subnet_update_post_invalid_routes_nexthop_ip_network( self ) : #NEWLINE# #INDENT# subnet = self . subnets . first ( ) #NEWLINE# api . neutron . subnet_get ( IsA ( http . HttpRequest ) , subnet . id ) . AndReturn ( subnet ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# host_routes = '172.16.0.0/24,10.0.0.253/24' #NEWLINE# form_data = form_data_subnet ( subnet , host_routes = host_routes , allocation_pools = [ ] ) #NEWLINE# url = reverse ( 'horizon:project:networks:editsubnet' , args = [ subnet . network_id , subnet . id ] ) #NEWLINE# res = self . client . post ( url , form_data ) #NEWLINE# self . assertContains ( res , ( 'host_routes: Invalid IP address (value=%s)' % host_routes . split ( ',' ) [ 1 ] ) )