mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
[tests] do not allow assert_raises_message to be called with JSONRPCException
This commit is contained in:
parent
3602d31395
commit
58a946c6bc
@ -53,6 +53,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'])
|
||||
|
Loading…
Reference in New Issue
Block a user