#NEWLINE# def _test_subnet_delete( self , mac_learning = False ) : #NEWLINE# #INDENT# subnet = self . subnets . first ( ) #NEWLINE# network_id = subnet . network_id #NEWLINE# api . neutron . subnet_delete ( IsA ( http . HttpRequest ) , subnet . id ) #NEWLINE# api . neutron . subnet_list ( IsA ( http . HttpRequest ) , network_id = network_id ) . AndReturn ( [ self . subnets . first ( ) ] ) #NEWLINE# api . neutron . network_get ( IsA ( http . HttpRequest ) , network_id ) . AndReturn ( self . networks . first ( ) ) #NEWLINE# api . neutron . port_list ( IsA ( http . HttpRequest ) , network_id = network_id ) . AndReturn ( [ self . ports . first ( ) ] ) #NEWLINE# api . neutron . network_get ( IsA ( http . HttpRequest ) , network_id ) . AndReturn ( self . networks . first ( ) ) #NEWLINE# api . neutron . is_extension_supported ( IsA ( http . HttpRequest ) , 'mac-learning' ) . AndReturn ( mac_learning ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# form_data = { #NEWLINE# #INDENT# 'action' : ( 'subnets__delete__%s' % res . id ) , #NEWLINE# #UNINDENT# } #NEWLINE# url = reverse ( NETWORKS_DETAIL_URL , args = [ network_id ] ) #NEWLINE# res = self . client . post ( url , form_data ) #NEWLINE# self . assertRedirectsNoFollow ( res , url )