aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-07-12 10:29:21 -0400
committerMarcoFalke <falke.marco@gmail.com>2017-11-01 10:40:22 -0400
commit623de0acbb7a586adba8d1f9a64c77fabb0e98a4 (patch)
tree2599885d2222dc81fd93246eac359fa545a5f510
parent5b728c8e98a4d3d72b1ca5f6ac287b453b0fb5d6 (diff)
downloadbitcoin-623de0acbb7a586adba8d1f9a64c77fabb0e98a4.tar.xz
[tests] do not allow assert_raises_message to be called with JSONRPCException
Github-Pull: #10853 Rebased-From: 677d893ff758b61f66203730da224bd7ef8f0b43
-rw-r--r--test/functional/test_framework/util.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py
index 44d7e04a89..ed35bf576e 100644
--- a/test/functional/test_framework/util.py
+++ b/test/functional/test_framework/util.py
@@ -51,6 +51,8 @@ def assert_raises(exc, fun, *args, **kwds):
def assert_raises_message(exc, message, fun, *args, **kwds):
try:
fun(*args, **kwds)
+ except JSONRPCException:
+ raise AssertionError("Use assert_raises_jsonrpc() to test RPC failures")
except exc as e:
if message is not None and message not in e.error['message']:
raise AssertionError("Expected substring not found:" + e.error['message'])