Module Expr Str ImportFrom alias Import alias Import alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias Import alias Import alias Assign NameStore Dict Str Str Assign NameStore Dict Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults body Expr Str Pass decorator_list NameLoad Expr Call NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str Str Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameStore body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults body Pass decorator_list NameLoad Expr Call NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad Global identifier Assign NameStore Dict Expr Call NameLoad Dict Str Str decorator_list decorator_list Call NameLoad NameLoad NameLoad
N/A N/A 
    :codeauthor: :email:`Mike Place <mp@saltstack.com>`
 __future__ absolute_import N/A os N/A shutil salttesting TestCase skipIf salttesting.mock NO_MOCK NO_MOCK_REASON salt.utils.cache context_cache N/A salt.payload N/A salt.utils N/A __context__ N/A a b N/A __opts__ N/A cachedir /tmp ContextCacheTest N/A TestCase N/A N/A 
    Test case for salt.utils.cache.ContextCache
     setUp N/A N/A self N/A N/A N/A 
        Clear the cache before every test
         N/A context_dir N/A N/A N/A os path join N/A __opts__ N/A cachedir context N/A N/A N/A N/A os path isdir context_dir N/A N/A N/A N/A shutil rmtree context_dir N/A test_set_cache N/A N/A self N/A N/A N/A 
        Tests to ensure the cache is written correctly
         _test_set_cache N/A N/A N/A N/A N/A 
            This will inherit globals from the test module itself.
            Normally these are injected by the salt loader [salt.loader]
             N/A N/A context_cache N/A N/A _test_set_cache N/A target_cache_file N/A N/A N/A os path join N/A __opts__ N/A cachedir context N/A N/A {0}.p format __name__ N/A N/A N/A self assertTrue N/A N/A N/A os path isfile target_cache_file Context cache did not write cache file N/A N/A N/A N/A salt utils fopen target_cache_file rb fp_ N/A N/A target_cache_data N/A N/A N/A N/A N/A salt payload Serial __opts__ load fp_ N/A N/A N/A self assertDictEqual __context__ target_cache_data N/A cc N/A N/A N/A N/A salt utils cache ContextCache __opts__ __name__ N/A retrieved_cache N/A N/A cc get_cache_context N/A N/A N/A self assertDictEqual retrieved_cache __context__ N/A test_refill_cache N/A N/A self N/A N/A N/A 
        Tests to ensure that the context cache can rehydrate a wrapped function
         _test_set_cache N/A N/A N/A N/A N/A N/A context_cache N/A N/A _test_set_cache _test_refill_cache N/A N/A comparison_context N/A N/A N/A N/A N/A self assertEqual __context__ comparison_context N/A context_cache N/A __context__ N/A __context__ N/A N/A N/A _test_refill_cache N/A a b N/A N/A N/A skipIf NO_MOCK NO_MOCK_REASON