#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . neutron : ( 'network_get' , 'subnet_create' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_subnet_create_post_network_exception( self ) : #NEWLINE# #INDENT# network = self . networks . first ( ) #NEWLINE# subnet = self . subnets . first ( ) #NEWLINE# api . neutron . network_get ( IsA ( http . HttpRequest ) , network . id ) . AndRaise ( self . exceptions . neutron ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# form_data = form_data_subnet ( subnet , allocation_pools = [ ] ) #NEWLINE# url = reverse ( 'horizon:project:networks:addsubnet' , args = [ subnet . network_id ] ) #NEWLINE# res = self . client . post ( url , form_data ) #NEWLINE# self . assertNoFormErrors ( res ) #NEWLINE# self . assertRedirectsNoFollow ( res , INDEX_URL )