Module Expr Str ImportFrom alias Import alias Import alias Import alias ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Raise Call NameLoad Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad For NameStore TupleLoad Str Str Str Str body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Call NameLoad Lambda arguments args defaults NameLoad keyword NameLoad keyword Str Assign NameStore Dict Str Str Str Str NameLoad Str Call NameLoad Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list With Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str NameStore body Assign AttributeStore NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr Str NameStore body Assign NameStore Call NameLoad ListLoad Num BinOpMult NameLoad Num Assign AttributeStore NameLoad attr Lambda arguments args defaults Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad With Call AttributeLoad NameLoad attr Str NameStore body Assign NameStore Call NameLoad ListLoad Num BinOpMult NameLoad Num Assign AttributeStore NameLoad attr Lambda arguments args defaults Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Num Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Index Num Index Num Index Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Assign NameStore Dict Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str NameLoad Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Index Num Index Num Index Str Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Index Num Index Num Index Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str TryExcept body Raise NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str NameLoad Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Index Num Index Num Index Str Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Index Num Index Num Index Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Str NameLoad decorator_list decorator_list
N/A N/A 
@author: David Siroky (siroky@dasir.cz)
@license: MIT License (see LICENSE.txt or
          U{http://www.opensource.org/licenses/mit-license.php})
 collections defaultdict N/A mock N/A snakemq.rpc N/A utils TestException N/A Exception N/A N/A N/A UnpickableData N/A object N/A __getstate__ N/A N/A self N/A N/A N/A N/A TypeError I'm not pickable N/A N/A TestRpc N/A N/A utils TestCase N/A test_remote_method_clone N/A N/A self N/A N/A N/A m1 N/A N/A N/A snakemq rpc RemoteMethod a b N/A m2 N/A N/A m1 clone N/A N/A N/A self assertNotEqual m1 m2 N/A attr N/A iproxy name call_timeout signal_timeout N/A N/A N/A N/A self assertEqual N/A getattr m1 attr N/A getattr m2 attr N/A N/A TestRpcClient N/A N/A utils TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self client N/A N/A N/A snakemq rpc RpcClient N/A N/A mock Mock N/A N/A N/A self client cond N/A N/A mock MagicMock N/A N/A self proxy N/A N/A N/A self client get_proxy peer some_proxy N/A test_regular_call N/A N/A self N/A N/A N/A 
        This test simulates situation when the peer is already connected.
         N/A N/A N/A self client connected N/A N/A mock Mock N/A N/A N/A N/A self client connected get N/A N/A mock Mock side_effect N/A N/A N/A ident N/A True N/A N/A N/A self client send_params N/A N/A mock Mock N/A req_id some id N/A params N/A defaultdict N/A N/A N/A N/A None req_id req_id command call N/A result N/A req_id return exception exception_format req_id x N/A TestException wait N/A N/A exc N/A N/A N/A N/A N/A self assertEqual exc N/A N/A snakemq rpc PartialCall N/A N/A N/A N/A self client store_result result N/A N/A N/A N/A N/A mock patch object N/A N/A snakemq rpc Wait __call__ wait_mock N/A N/A N/A wait_mock side_effect wait N/A N/A result N/A ok True N/A N/A N/A self assertEqual N/A result N/A return N/A N/A N/A self client remote_request some ident N/A N/A self proxy some_method params N/A N/A N/A self assertEqual N/A N/A self client waiting_for_result N/A set N/A N/A N/A self assertEqual N/A N/A self client results N/A N/A N/A result N/A ok False N/A N/A N/A self assertRaises TestException N/A N/A self client remote_request some ident N/A N/A self proxy some_method params N/A N/A N/A self assertEqual N/A N/A self client waiting_for_result N/A set N/A N/A N/A self assertEqual N/A N/A self client results N/A N/A test_call_timeout_not_connected N/A N/A self N/A N/A N/A N/A N/A self client connected N/A N/A mock Mock N/A N/A N/A N/A self client connected get N/A N/A mock Mock side_effect N/A N/A N/A ident N/A False N/A method N/A N/A self proxy some_method N/A timeout 1 N/A N/A N/A method set_timeout timeout N/A N/A N/A self assertEqual timeout N/A method call_timeout N/A N/A N/A mock patch snakemq.rpc.get_time time_mock N/A N/A time_results N/A iter N/A 0.0 N/A timeout 1.1 N/A N/A time_mock side_effect N/A N/A N/A N/A N/A next time_results N/A N/A N/A self assertRaises N/A N/A snakemq rpc NotConnected method N/A N/A N/A self assertEqual N/A N/A N/A N/A self client cond wait call_count 1 N/A N/A N/A self assertEqual N/A N/A N/A N/A self client connected get call_count 2 N/A N/A N/A self assertEqual N/A N/A self client waiting_for_result N/A set N/A test_call_timeout_partial_call N/A N/A self N/A N/A N/A 
        Timeout is caused by long reply time from the connected peer.
         N/A N/A N/A self client connected N/A N/A mock Mock N/A N/A N/A N/A self client connected get N/A N/A mock Mock side_effect N/A N/A N/A ident N/A True N/A N/A N/A self client send_params N/A N/A mock Mock N/A method N/A N/A self proxy some_method N/A timeout 1 N/A N/A N/A method set_timeout timeout N/A N/A N/A mock patch snakemq.rpc.get_time time_mock N/A N/A time_results N/A iter N/A 0.0 N/A timeout 1.1 N/A N/A time_mock side_effect N/A N/A N/A N/A N/A next time_results N/A N/A N/A self assertRaises N/A N/A snakemq rpc PartialCall method N/A N/A N/A self assertEqual N/A N/A N/A N/A self client cond wait call_count 1 N/A N/A N/A self assertEqual N/A N/A N/A N/A self client connected get call_count 2 N/A req_id N/A N/A N/A N/A N/A N/A self client send_params call_args N/A 0 N/A 1 N/A req_id N/A N/A N/A self assertEqual N/A N/A self client waiting_for_result N/A set N/A result N/A req_id req_id N/A N/A N/A N/A self client store_result result N/A N/A N/A self assertEqual N/A N/A self client results N/A N/A N/A TestRpcServer N/A N/A utils TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self server N/A N/A N/A snakemq rpc RpcServer N/A N/A mock Mock N/A test_send_unpickable N/A N/A self N/A N/A N/A N/A N/A self assertRaises N/A N/A N/A self server pickler PickleError N/A N/A self server send some ident N/A UnpickableData N/A test_send_exception N/A N/A self N/A N/A N/A N/A N/A self server send N/A N/A mock Mock wraps N/A N/A self server send N/A exc N/A TestException N/A N/A N/A N/A self server send_exception some ident req id exc N/A exc_value N/A N/A N/A N/A N/A N/A self server send call_args N/A 0 N/A 1 N/A exception N/A exc_format N/A N/A N/A N/A N/A N/A self server send call_args N/A 0 N/A 1 N/A exception_format N/A N/A N/A self assertEqual exc_value exc N/A N/A N/A self assertEqual exc_format N/A N/A N/A exc N/A N/A N/A TestException N/A N/A N/A N/A N/A self server send_exception some ident req id exc N/A exc_value N/A N/A N/A N/A N/A N/A self server send call_args N/A 0 N/A 1 N/A exception N/A exc_format N/A N/A N/A N/A N/A N/A self server send call_args N/A 0 N/A 1 N/A exception_format N/A N/A N/A self assertEqual exc_value exc N/A N/A N/A self assertNotEqual exc_format N/A N/A N/A self assertTrue N/A isinstance exc_format str N/A exc_format __class__ N/A exc N/A TestException N/A UnpickableData N/A N/A N/A self assertRaises N/A exc __class__ N/A N/A self server send_exception some ident req id exc N/A N/A