Module ImportFrom alias alias alias Import alias Import alias Import alias Import alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str attr Str Str If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad Assign NameStore Dict Str Str Num BinOpMod Str NameLoad Assign NameStore Dict Str Str TryExcept body With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str handlers ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Expr Call NameLoad NameLoad Return Call NameLoad Num NameLoad NameLoad keyword NameLoad decorator_list Call NameLoad keyword Str ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body ImportFrom alias Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr With Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad With Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If CompareEq Call AttributeLoad NameLoad attr Str body Return ImportFrom alias ImportFrom alias Assign NameStore TupleLoad Str Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareEq Call AttributeLoad NameLoad attr Str body Return ImportFrom alias ImportFrom alias Assign NameStore TupleLoad Str Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad With Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If CompareEq SubscriptLoad AttributeLoad NameLoad attr Slice Num TupleLoad Num Num body Return ImportFrom alias Assign NameStore Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If CompareEq SubscriptLoad AttributeLoad NameLoad attr Slice Num TupleLoad Num Num body Return ImportFrom alias Assign NameStore Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If CompareEq SubscriptLoad AttributeLoad NameLoad attr Slice Num TupleLoad Num Num body Return Assign NameStore Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad With Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list decorator_list
N/A __future__ absolute_import unicode_literals print_function N/A os N/A sys N/A platform N/A unittest httmock urlmatch HTTMock response wechatpy WeChatClient wechatpy.utils json N/A _TESTS_PATH N/A N/A N/A os path abspath N/A N/A N/A os path dirname __file__ N/A _FIXTURE_PATH N/A N/A N/A os path join _TESTS_PATH fixtures wechat_api_mock N/A N/A url request N/A N/A N/A path N/A N/A N/A N/A N/A url path replace /cgi-bin/ replace / _ N/A N/A N/A path startswith _ N/A N/A path N/A path N/A 1 N/A res_file N/A N/A N/A os path join _FIXTURE_PATH N/A %s.json path N/A content N/A errcode errmsg 99999 N/A can not find fixture %s res_file N/A headers N/A Content-Type application/json N/A N/A N/A N/A open res_file rb f N/A N/A content N/A N/A json loads N/A N/A N/A N/A f read decode utf-8 N/A N/A N/A N/A IOError ValueError N/A e N/A N/A N/A print e N/A N/A response 200 content headers request request N/A N/A urlmatch netloc (.*\.)?api\.weixin\.qq\.com$ WeChatSessionTestCase N/A N/A unittest TestCase N/A N/A app_id 123456 N/A secret 123456 test_memory_session_storage_init N/A N/A self N/A N/A wechatpy.session.memorystorage MemoryStorage N/A client N/A WeChatClient N/A self app_id N/A self secret N/A N/A N/A self assertTrue N/A isinstance N/A client session MemoryStorage N/A test_memory_session_storage_access_token N/A N/A self N/A N/A N/A client N/A WeChatClient N/A self app_id N/A self secret N/A N/A HTTMock wechat_api_mock N/A N/A token N/A N/A client fetch_access_token N/A N/A N/A self assertEqual 1234567890 N/A token N/A access_token N/A N/A N/A self assertEqual 7200 N/A token N/A expires_in N/A N/A N/A self assertEqual 1234567890 N/A client access_token N/A test_redis_session_storage_init N/A N/A self N/A N/A redis Redis wechatpy.session.redisstorage RedisStorage N/A redis N/A Redis N/A session N/A RedisStorage redis N/A client N/A WeChatClient N/A self app_id N/A self secret session session N/A N/A N/A self assertTrue N/A isinstance N/A client session RedisStorage N/A test_redis_session_storage_access_token N/A N/A self N/A N/A redis Redis wechatpy.session.redisstorage RedisStorage N/A redis N/A Redis N/A session N/A RedisStorage redis N/A client N/A WeChatClient N/A self app_id N/A self secret session session N/A N/A HTTMock wechat_api_mock N/A N/A token N/A N/A client fetch_access_token N/A N/A N/A self assertEqual 1234567890 N/A token N/A access_token N/A N/A N/A self assertEqual 7200 N/A token N/A expires_in N/A N/A N/A self assertEqual 1234567890 N/A client access_token N/A test_memcached_storage_init N/A N/A self N/A N/A N/A N/A N/A N/A platform system Windows N/A N/A pymemcache.client Client wechatpy.session.memcachedstorage MemcachedStorage N/A servers N/A 127.0.0.1 11211 N/A memcached N/A Client servers N/A session N/A MemcachedStorage memcached N/A client N/A WeChatClient N/A self app_id N/A self secret session session N/A N/A N/A self assertTrue N/A isinstance N/A client session MemcachedStorage N/A test_memcached_storage_access_token N/A N/A self N/A N/A N/A N/A N/A N/A platform system Windows N/A N/A pymemcache.client Client wechatpy.session.memcachedstorage MemcachedStorage N/A servers N/A 127.0.0.1 11211 N/A memcached N/A Client servers N/A session N/A MemcachedStorage memcached N/A client N/A WeChatClient N/A self app_id N/A self secret session session N/A N/A HTTMock wechat_api_mock N/A N/A token N/A N/A client fetch_access_token N/A N/A N/A self assertEqual 1234567890 N/A token N/A access_token N/A N/A N/A self assertEqual 7200 N/A token N/A expires_in N/A N/A N/A self assertEqual 1234567890 N/A client access_token N/A test_shove_storage_init N/A N/A self N/A N/A N/A N/A N/A N/A sys version_info N/A 2 N/A 2 6 N/A N/A wechatpy.session.shovestorage ShoveStorage N/A uri memory:// N/A client N/A WeChatClient N/A self app_id N/A self secret session uri N/A N/A N/A self assertTrue N/A isinstance N/A client session ShoveStorage N/A N/A N/A self assertEqual wechatpy N/A N/A client session prefix N/A test_shove_storage_init_with_prefix N/A N/A self N/A N/A N/A N/A N/A N/A sys version_info N/A 2 N/A 2 6 N/A N/A wechatpy.session.shovestorage ShoveStorage N/A uri memory://?prefix=custom_prefix N/A client N/A WeChatClient N/A self app_id N/A self secret session uri N/A N/A N/A self assertTrue N/A isinstance N/A client session ShoveStorage N/A N/A N/A self assertEqual custom_prefix N/A N/A client session prefix N/A test_shove_storage_access_token N/A N/A self N/A N/A N/A N/A N/A N/A sys version_info N/A 2 N/A 2 6 N/A N/A N/A uri memory:// N/A client N/A WeChatClient N/A self app_id N/A self secret session uri N/A N/A HTTMock wechat_api_mock N/A N/A token N/A N/A client fetch_access_token N/A N/A N/A self assertEqual 1234567890 N/A token N/A access_token N/A N/A N/A self assertEqual 7200 N/A token N/A expires_in N/A N/A N/A self assertEqual 1234567890 N/A client access_token N/A N/A