#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . neutron : ( 'profile_list' , ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_network_create_post_with_subnet_gw_inconsistent( self , test_with_profile = False ) : #NEWLINE# #INDENT# network = self . networks . first ( ) #NEWLINE# subnet = self . subnets . first ( ) #NEWLINE# if test_with_profile : #NEWLINE# #INDENT# net_profiles = self . net_profiles . list ( ) #NEWLINE# net_profile_id = self . net_profiles . first ( ) . id #NEWLINE# api . neutron . profile_list ( IsA ( http . HttpRequest ) , 'network' ) . AndReturn ( net_profiles ) #NEWLINE# #UNINDENT# self . mox . ReplayAll ( ) #NEWLINE# gateway_ip = '2001:0DB8:0:CD30:123:4567:89AB:CDEF' #NEWLINE# form_data = { #NEWLINE# #INDENT# 'net_name' : network . name , #NEWLINE# 'admin_state' : network . admin_state_up , #NEWLINE# 'with_subnet' : True , #NEWLINE# #UNINDENT# } #NEWLINE# if test_with_profile : #NEWLINE# #INDENT# form_data [ 'net_profile_id' ] = net_profile_id #NEWLINE# #UNINDENT# form_data . update ( form_data_subnet ( subnet , gateway_ip = url , allocation_pools = [ ] ) ) #NEWLINE# url = reverse ( 'horizon:project:networks:create' ) #NEWLINE# res = self . client . post ( url , form_data ) #NEWLINE# self . assertContains ( res , 'Gateway IP and IP version are inconsistent.' )