#NEWLINE# def test_dropbox_folder_list( self ) : #NEWLINE# #INDENT# with patch_client ( 'website.addons.dropbox.views.DropboxClient' ) : #NEWLINE# #INDENT# url = self . project . api_url_for ( 'dropbox_folder_list' , folderId = '/' ) #NEWLINE# res = self . app . get ( url , auth = self . user . auth ) #NEWLINE# contents = [ x for x in mock_client . metadata ( '' , list = True ) [ 'contents' ] if x [ 'is_dir' ] ] #NEWLINE# assert_equal ( len ( res . json ) , len ( contents ) ) #NEWLINE# first = res . json [ 0 ] #NEWLINE# assert_in ( 'kind' , first ) #NEWLINE# assert_equal ( first [ 'path' ] , contents [ 0 ] [ 'path' ] )