Module Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args defaults body Expr Call NameLoad NameLoad keyword AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad NameLoad body Assign NameStore Str Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Dict Str Str Str Str Dict Str Str Str Str Str Str Str Str Str Str Str Num Str NameLoad Str Str Str Str Num Str Str NameLoad Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Num NameLoad Str Str Str NameLoad Str Str ListLoad Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str NameLoad Num Str Str Str NameLoad Str Str Str Num Dict Str Str Str Str Str Str Str Str Str Str Num Str NameLoad Str Str Str Num Str Str NameLoad Num Dict Str Str Str Str Str Str Str Str Str Str Str Str Num Str Str NameLoad Str Str Str Str Num Str Str NameLoad ListLoad Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Num Str Str NameLoad NameLoad Str Str Str Str Num Str Str NameLoad Dict Str Str Str Str Str Str Str Str Str Str Str Str Num Str Str NameLoad Str Str Str Str Num Str Str NameLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Return SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad NameLoad NameLoad body If NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str orelse Assign NameStore SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Return SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore SubscriptLoad NameLoad Index Str For NameStore NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Dict Str Str decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str With Call AttributeLoad NameLoad attr NameLoad NameStore body Assign NameStore BoolOpOr NameLoad Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Yield NameLoad decorator_list NameLoad
N/A N/A mock contextlib contextmanager modularodm storage framework.mongo set_up_storage website.addons.base.testing OAuthAddonTestCaseMixin AddonTestCase website.addons.dropbox MODELS website.addons.dropbox.model DropboxProvider website.addons.dropbox.tests.factories DropboxAccountFactory init_storage N/A N/A N/A N/A N/A N/A set_up_storage MODELS storage_class N/A storage MongoStorage N/A DropboxAddonTestCase N/A OAuthAddonTestCaseMixin AddonTestCase N/A N/A ADDON_SHORT_NAME dropbox N/A ExternalAccountFactory DropboxAccountFactory N/A Provider DropboxProvider set_node_settings N/A N/A self settings N/A N/A N/A N/A N/A N/A super DropboxAddonTestCase self set_node_settings settings N/A N/A settings folder foo N/A N/A N/A settings save N/A N/A N/A mock_responses N/A put_file metadata_list metadata_single revisions N/A bytes icon is_dir mime_type modified path rev revision root size thumb_exists 77 page_white_text False text/plain Wed, 20 Jul 2011 22:04:50 +0000 /magnum-opus.txt 362e2029684fe 221922 dropbox 77 bytes False N/A size hash bytes thumb_exists rev modified path is_dir icon root contents revision 0 bytes 37eb1ba1849d4b0fb0b28caf7ef3af52 0 False 714f029684fe Wed, 27 Apr 2011 22:18:51 +0000 /Public True folder_public dropbox N/A N/A size rev thumb_exists bytes modified client_mtime path is_dir icon root mime_type revision 0 bytes 35c1f029684fe False 0 Mon, 18 Jul 2011 20:13:43 +0000 Wed, 20 Apr 2011 16:20:19 +0000 /Public/latest.txt False page_white_text dropbox text/plain 220191 N/A bytes icon is_dir modified path rev revision root size thumb_exists 0 folder True Sat, 22 Mar 2014 05:40:29 +0000 /datasets/New Folder 3fed51f002c12fc 67032351 dropbox 0 bytes False 29007 N/A bytes client_mtime icon is_dir mime_type modified path rev revision root size thumb_exists 74 Mon, 13 Jan 2014 20:24:15 +0000 page_white False text/csv Fri, 21 Mar 2014 05:46:36 +0000 /datasets/foo.txt a2149fb64 10 app_folder 74 bytes False N/A N/A bytes client_mtime icon is_deleted is_dir mime_type modified path rev revision root size thumb_exists 0 Wed, 31 Dec 1969 23:59:59 +0000 page_white_picture True False image/png Tue, 25 Mar 2014 03:39:13 +0000 /svs-v-barks.png 3fed741002c12fc 67032897 dropbox 0 bytes True N/A bytes client_mtime icon is_dir mime_type modified path rev revision root size thumb_exists 151164 Sat, 13 Apr 2013 21:56:36 +0000 page_white_picture False image/png Tue, 25 Mar 2014 01:45:51 +0000 /svs-v-barks.png 3fed61a002c12fc 67032602 dropbox 147.6 KB True MockDropbox N/A object N/A put_file N/A N/A self full_path file_obj overwrite parent_rev N/A False None N/A N/A N/A mock_responses N/A put_file N/A metadata N/A N/A self path list file_limit hash rev include_deleted N/A True 25000 None None False N/A N/A list N/A N/A ret N/A mock_responses N/A metadata_list N/A N/A ret N/A mock_responses N/A metadata_single N/A N/A ret N/A path path N/A ret N/A get_file_and_metadata N/A N/A N/A args kwargs N/A N/A N/A file_delete N/A N/A self path N/A N/A N/A N/A mock_responses N/A metadata_single N/A revisions N/A N/A self path N/A N/A N/A ret N/A mock_responses N/A revisions N/A each ret N/A N/A N/A each N/A path path N/A ret N/A account_info N/A N/A self N/A N/A N/A N/A display_name Mr. Drop Box N/A N/A patch_client N/A N/A target mock_client N/A None N/A N/A Patches a function that returns a DropboxClient, returning an instance
    of MockDropbox instead.

    Usage: ::

        with patch_client('website.addons.dropbox.view.config.get_client') as client:
            # test view that uses the dropbox client.
     N/A N/A N/A mock patch target client_getter N/A N/A client N/A mock_client N/A MockDropbox N/A N/A client_getter return_value client N/A N/A client N/A contextmanager