aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/test_framework/authproxy.py
AgeCommit message (Collapse)Author
2016-10-03test: Avoid ConnectionResetErrors during RPC testsWladimir J. van der Laan
This is necessary on FreeBSD and MacOSX, at least. See https://github.com/bitcoin/bitcoin/pull/8834#issuecomment-250450213 Github-Pull: #8839 Rebased-From: 1d28faf9e94fcf240ece7336d61ec297b064bc37
2016-06-10test: add ensure_ascii setting to AuthServiceProxyWladimir J. van der Laan
Add a setting ensure_ascii to AuthServiceProxy. This setting, defaulting to True (backwards compatible), is passed through to json.dumps. If set to False, non-ASCII characters >0x80 are not escaped. This is useful for testing server input processing, as well as slightly more bandwidth friendly in case of heavy unicode usage.
2016-06-02Fix interrupted HTTP RPC connection workaround for Python 3.5+Pieter Wuille
2016-04-07tests: Check Content-Type header returned from RPC serverWladimir J. van der Laan
Check the Content-Type header that is returned from the RPC server. Only if it is `application/json` the data is supposed to be parsed as JSON. This gives better reporting if the HTTP server happens to return an error that is not JSON-formatted, which is the case if it happens at a lower level before JSON-RPC kicks in. Before: `Unexpected exception caught during testing: No JSON object could be decoded` After: `JSONRPC error: non-JSON HTTP response with '403 Forbidden' from server`
2016-03-28test_framework: Py3.4 compat: Specify timeout parameter by nameLuke Dashjr
Changed in version 3.4: The strict parameter was removed. HTTP 0.9-style “Simple Responses” are not longer supported. (https://docs.python.org/3/library/http.client.html) Source: https://github.com/jgarzik/python-bitcoinrpc/commit/7ebeebb4f61917fe590d980cb4f9aefdce2c8f25
2016-03-28test_framework: Avoid infinite loop in encoding DecimalWladimir J. van der Laan
Avoid an infinite loop in encoding, by ensuring EncodeDecimal returns a string. round(Decimal) used to convert it to float, but it no longer does in python 3.x. Strings are supported since #6380, so just use that.
2015-11-11Add basic coverage reporting for RPC testsJames O'Beirne
Thanks to @MarcoFalke @dexX7 @laanwj for review.
2015-09-21Make RPC tests cope with server-side timeout between requestsWladimir J. van der Laan
Python's httplib does not graciously handle disconnections from the http server, resulting in BadStatusLine errors. See https://bugs.python.org/issue3566 "httplib persistent connections violate MUST in RFC2616 sec 8.1.4." This was fixed in Python 3.5. Work around it for now.
2015-05-21rpc-tests: remove python-bitcoinrpc directoryJonas Schnelli
place authproxy.py at same level as other utility classes