#NEWLINE# def test_copy_new_version( self ) : #NEWLINE# #INDENT# self . app . register ( 'COPY' , '/v1/a/src_cont/src_obj' , swob . HTTPOk , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , 'passed' ) #NEWLINE# self . app . register ( 'GET' , '/v1/a/tgt_cont/tgt_obj' , swob . HTTPOk , { #NEWLINE# #INDENT# 'last-modified' : 'Thu, 1 Jan 1970 00:00:01 GMT' , #NEWLINE# #UNINDENT# } , 'passed' ) #NEWLINE# self . app . register ( 'PUT' , '/v1/a/ver_cont/007tgt_obj/0000000001.00000' , swob . HTTPOk , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , None ) #NEWLINE# cache = FakeCache ( { #NEWLINE# #INDENT# 'sysmeta' : { #NEWLINE# #INDENT# 'versions-location' : 'ver_cont' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# req = Request . blank ( '/v1/a/src_cont/src_obj' , environ = { #NEWLINE# #INDENT# 'REQUEST_METHOD' : 'COPY' , #NEWLINE# 'swift.cache' : cache , #NEWLINE# 'CONTENT_LENGTH' : '100' , #NEWLINE# #UNINDENT# } , headers = { #NEWLINE# #INDENT# 'Destination' : 'tgt_cont/tgt_obj' , #NEWLINE# #UNINDENT# } ) #NEWLINE# ( status , headers , body ) = self . call_vw ( req ) #NEWLINE# self . assertEqual ( status , '200 OK' ) #NEWLINE# self . assertEqual ( len ( self . authorized ) , 1 ) #NEWLINE# self . assertRequestEqual ( req , self . authorized [ 0 ] ) #NEWLINE# self . assertEqual ( 3 , self . app . call_count )