#NEWLINE# @ local_tz #NEWLINE# def test_new_version_sysmeta_precedence( self ) : #NEWLINE# #INDENT# self . app . register ( 'PUT' , '/v1/a/c/o' , swob . HTTPOk , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , 'passed' ) #NEWLINE# self . app . register ( 'GET' , '/v1/a/c/o' , swob . HTTPOk , { #NEWLINE# #INDENT# 'last-modified' : 'Thu, 1 Jan 1970 00:00:00 GMT' , #NEWLINE# #UNINDENT# } , 'passed' ) #NEWLINE# self . app . register ( 'PUT' , '/v1/a/ver_cont/001o/0000000000.00000' , swob . HTTPOk , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , None ) #NEWLINE# cache = FakeCache ( { #NEWLINE# #INDENT# 'versions' : 'old_ver_cont' , #NEWLINE# 'sysmeta' : { #NEWLINE# #INDENT# 'versions-location' : 'ver_cont' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# req = Request . blank ( '/v1/a/c/o' , environ = { #NEWLINE# #INDENT# 'REQUEST_METHOD' : 'PUT' , #NEWLINE# 'swift.cache' : cache , #NEWLINE# 'CONTENT_LENGTH' : '100' , #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# calls = self . app . calls_with_headers #NEWLINE# ( method , path , req_headers ) = calls [ 1 ] #NEWLINE# self . assertEqual ( 'PUT' , method ) #NEWLINE# self . assertEqual ( '/v1/a/ver_cont/001o/0000000000.00000' , path )