#NEWLINE# def test_create_delete_policy_target_with_port( self ) : #NEWLINE# #INDENT# with self . port ( ) as port : #NEWLINE# #INDENT# port_id = port [ 'port' ] [ 'id' ] #NEWLINE# pt = self . create_policy_target ( port_id = port_id ) #NEWLINE# pt_id = pt [ 'policy_target' ] [ 'id' ] #NEWLINE# self . assertEqual ( port_id , pt [ 'policy_target' ] [ 'port_id' ] ) #NEWLINE# req = self . new_show_request ( 'policy_targets' , pt_id , fmt = res . fmt ) #NEWLINE# res = self . deserialize ( self . fmt , req . get_response ( self . ext_api ) ) #NEWLINE# self . assertEqual ( port_id , res [ 'policy_target' ] [ 'port_id' ] ) #NEWLINE# req = self . new_delete_request ( 'policy_targets' , pt_id ) #NEWLINE# res = req . get_response ( self . ext_api ) #NEWLINE# self . assertEqual ( webob . exc . HTTPNoContent . code , res . status_int )