aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/test_framework/authproxy.py
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@gmail.com>2015-10-10 22:41:19 -0700
committerJames O'Beirne <james.obeirne@gmail.com>2015-11-11 10:33:43 -0800
commitb5cbd396ca7214f4f944163ed314456038fdd818 (patch)
tree840fb2890c1b703c0b5d08d19a103003ae238eb4 /qa/rpc-tests/test_framework/authproxy.py
parent3038eb63e8a674b4818cb5d5e461f1ccf4b2932f (diff)
downloadbitcoin-b5cbd396ca7214f4f944163ed314456038fdd818.tar.xz
Add basic coverage reporting for RPC tests
Thanks to @MarcoFalke @dexX7 @laanwj for review.
Diffstat (limited to 'qa/rpc-tests/test_framework/authproxy.py')
-rw-r--r--qa/rpc-tests/test_framework/authproxy.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/qa/rpc-tests/test_framework/authproxy.py b/qa/rpc-tests/test_framework/authproxy.py
index 33014dc139..fba469a0dd 100644
--- a/qa/rpc-tests/test_framework/authproxy.py
+++ b/qa/rpc-tests/test_framework/authproxy.py
@@ -69,7 +69,7 @@ class AuthServiceProxy(object):
def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT, connection=None):
self.__service_url = service_url
- self.__service_name = service_name
+ self._service_name = service_name
self.__url = urlparse.urlparse(service_url)
if self.__url.port is None:
port = 80
@@ -102,8 +102,8 @@ class AuthServiceProxy(object):
if name.startswith('__') and name.endswith('__'):
# Python internal stuff
raise AttributeError
- if self.__service_name is not None:
- name = "%s.%s" % (self.__service_name, name)
+ if self._service_name is not None:
+ name = "%s.%s" % (self._service_name, name)
return AuthServiceProxy(self.__service_url, name, connection=self.__conn)
def _request(self, method, path, postdata):
@@ -129,10 +129,10 @@ class AuthServiceProxy(object):
def __call__(self, *args):
AuthServiceProxy.__id_count += 1
- log.debug("-%s-> %s %s"%(AuthServiceProxy.__id_count, self.__service_name,
+ log.debug("-%s-> %s %s"%(AuthServiceProxy.__id_count, self._service_name,
json.dumps(args, default=EncodeDecimal)))
postdata = json.dumps({'version': '1.1',
- 'method': self.__service_name,
+ 'method': self._service_name,
'params': args,
'id': AuthServiceProxy.__id_count}, default=EncodeDecimal)
response = self._request('POST', self.__url.path, postdata)