Skip to content
Snippets Groups Projects
Commit a3e47ef8 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #8887: one can't mock the 'protected' __call__ method. so renamed it to...

Task #8887: one can't mock the 'protected' __call__ method. so renamed it to execute and let __call__ be a wrapper for execte
parent af8bd58d
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
from .messagebus import ToBus, FromBus from .messagebus import ToBus, FromBus
from .messages import RequestMessage, ReplyMessage from .messages import RequestMessage, ReplyMessage
import uuid import uuid
import logging
logger = logging.getLogger(__name__)
def _analyze_args(args,kwargs): def _analyze_args(args,kwargs):
HasKwArgs=(len(kwargs)>0) HasKwArgs=(len(kwargs)>0)
...@@ -134,6 +137,10 @@ class RPC(): ...@@ -134,6 +137,10 @@ class RPC():
result=myrpc(request) result=myrpc(request)
""" """
return self.execute(*args, **kwargs)
def execute(self, *args, **kwargs):
'''execute the remote procedure call'''
timeout = kwargs.pop("timeout", self.timeout) timeout = kwargs.pop("timeout", self.timeout)
Content = _args_as_content(*args, **kwargs) Content = _args_as_content(*args, **kwargs)
HasArgs, HasKwArgs = _analyze_args(args, kwargs) HasArgs, HasKwArgs = _analyze_args(args, kwargs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment