#NEWLINE# def test_create_delete_l2_policy_with_network( self ) : #NEWLINE# #INDENT# with self . network ( ) as network : #NEWLINE# #INDENT# network_id = network [ 'network' ] [ 'id' ] #NEWLINE# l2p = self . create_l2_policy ( network_id = network_id ) #NEWLINE# l2p_id = l2p [ 'l2_policy' ] [ 'id' ] #NEWLINE# self . assertEqual ( network_id , l2p [ 'l2_policy' ] [ 'network_id' ] ) #NEWLINE# req = self . new_show_request ( 'l2_policies' , l2p_id , fmt = self . fmt ) #NEWLINE# res = self . deserialize ( self . fmt , req . get_response ( self . ext_api ) ) #NEWLINE# self . assertEqual ( network_id , res [ 'l2_policy' ] [ 'network_id' ] ) #NEWLINE# req = self . new_delete_request ( 'l2_policies' , l2p_id ) #NEWLINE# res = req . get_response ( self . ext_api ) #NEWLINE# self . assertEqual ( webob . exc . HTTPNoContent . code , res . status_int )