#NEWLINE# def test_delete_first_object_success( self ) : #NEWLINE# #INDENT# self . app . register ( 'DELETE' , '/v1/a/c/o' , swob . HTTPOk , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , 'passed' ) #NEWLINE# self . app . register ( 'GET' , '/v1/a/ver_cont?format=json&prefix=001o/&marker=&reverse=on' , swob . HTTPNotFound , { #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/c/o' , environ = { #NEWLINE# #INDENT# 'REQUEST_METHOD' : 'DELETE' , #NEWLINE# 'swift.cache' : cache , #NEWLINE# 'CONTENT_LENGTH' : '0' , #NEWLINE# 'swift.trans_id' : 'fake_trans_id' , #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 ( 2 , self . app . call_count ) #NEWLINE# self . assertEqual ( [ 'VW' , None ] , self . app . swift_sources ) #NEWLINE# self . assertEqual ( { 'fake_trans_id' } , set ( self . app . txn_ids ) ) #NEWLINE# prefix_listing_prefix = '/v1/a/ver_cont?format=json&prefix=001o/&' #NEWLINE# self . assertEqual ( self . app . calls , [ ( 'GET' , ( prefix_listing_prefix + 'marker=&reverse=on' ) ) , ( 'DELETE' , '/v1/a/c/o' ) ] )