#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . nova : ( 'server_list' , ) , #NEWLINE# api . network : ( 'floating_ip_disassociate' , 'floating_ip_supported' , 'tenant_floating_ip_get' , 'tenant_floating_ip_list' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_disassociate_post( self ) : #NEWLINE# #INDENT# floating_ip = self . floating_ips . first ( ) #NEWLINE# api . nova . server_list ( IsA ( http . HttpRequest ) ) . AndReturn ( [ self . servers . list ( ) , False ] ) #NEWLINE# api . network . floating_ip_supported ( IsA ( http . HttpRequest ) ) . AndReturn ( True ) #NEWLINE# api . network . tenant_floating_ip_list ( IsA ( http . HttpRequest ) ) . AndReturn ( self . floating_ips . list ( ) ) #NEWLINE# api . network . floating_ip_disassociate ( IsA ( http . HttpRequest ) , floating_ip . id ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# action = ( 'floating_ips__disassociate__%s' % floating_ip . id ) #NEWLINE# res = self . client . post ( INDEX_URL , { #NEWLINE# #INDENT# 'action' : action , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertMessageCount ( success = 1 ) #NEWLINE# self . assertRedirectsNoFollow ( res , INDEX_URL )