#NEWLINE# def test_update_to_implicit( self ) : #NEWLINE# #INDENT# l3p1 = self . create_l3_policy ( ) #NEWLINE# l3p1_id = l3p1 [ 'l3_policy' ] [ 'id' ] #NEWLINE# l2p = self . create_l2_policy ( l3_policy_id = l3p1_id ) #NEWLINE# l2p_id = l2p [ 'l2_policy' ] [ 'id' ] #NEWLINE# self . assertEqual ( l3p1_id , l2p [ 'l2_policy' ] [ 'l3_policy_id' ] ) #NEWLINE# data = { #NEWLINE# #INDENT# 'l2_policy' : { #NEWLINE# #INDENT# 'l3_policy_id' : None , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# req = self . new_update_request ( 'l2_policies' , data , l2p_id ) #NEWLINE# l2p = self . deserialize ( self . fmt , req . get_response ( self . ext_api ) ) #NEWLINE# l3p2_id = l2p [ 'l2_policy' ] [ 'l3_policy_id' ] #NEWLINE# self . assertNotEqual ( l3p1_id , l3p2_id ) #NEWLINE# self . assertIsNotNone ( l3p2_id ) #NEWLINE# req = self . new_show_request ( 'l3_policies' , l3p2_id , fmt = self . fmt ) #NEWLINE# l3p2 = self . deserialize ( self . fmt , req . get_response ( self . ext_api ) ) #NEWLINE# self . assertEqual ( 'default' , l3p1_id [ 'l3_policy' ] [ 'name' ] ) #NEWLINE# req = self . new_show_request ( 'l3_policies' , l3p1_id , fmt = self . fmt ) #NEWLINE# res = req . get_response ( self . ext_api ) #NEWLINE# self . assertEqual ( webob . exc . HTTPOk . code , res . status_int ) #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 ) #NEWLINE# req = self . new_show_request ( 'l3_policies' , l3p2_id , fmt = self . fmt ) #NEWLINE# res = req . get_response ( self . ext_api ) #NEWLINE# self . assertEqual ( webob . exc . HTTPNotFound . code , res . status_int )