#NEWLINE# @ mock . patch ( 'website.addons.dropbox.views.DropboxClient.metadata' ) #NEWLINE# def test_dropbox_folder_list_deleted( self , mock_metadata ) : #NEWLINE# #INDENT# mock_metadata . return_value = { #NEWLINE# #INDENT# 'bytes' : 0 , #NEWLINE# 'contents' : [ ] , #NEWLINE# 'hash' : 'e3c62eb85bc50dfa1107b4ca8047812b' , #NEWLINE# 'icon' : 'folder_gray' , #NEWLINE# 'is_deleted' : True , #NEWLINE# 'is_dir' : True , #NEWLINE# 'modified' : 'Sat, 29 Mar 2014 20:11:49 +0000' , #NEWLINE# 'path' : '/tests' , #NEWLINE# 'rev' : '3fed844002c12fc' , #NEWLINE# 'revision' : 67033156 , #NEWLINE# 'root' : 'dropbox' , #NEWLINE# 'size' : '0 bytes' , #NEWLINE# 'thumb_exists' : False , #NEWLINE# #UNINDENT# } #NEWLINE# url = self . project . api_url_for ( 'dropbox_folder_list' , folderId = '/tests' ) #NEWLINE# with mock . patch . object ( type ( self . node_settings ) , 'has_auth' , True ) : #NEWLINE# #INDENT# res = self . app . get ( url , auth = res . user . auth , expect_errors = True ) #NEWLINE# #UNINDENT# assert_equal ( res . status_code , http . NOT_FOUND )