diff options
| author | John Newbery <[email protected]> | 2017-07-12 10:29:21 -0400 |
|---|---|---|
| committer | John Newbery <[email protected]> | 2017-10-05 09:48:46 -0400 |
| commit | 677d893ff758b61f66203730da224bd7ef8f0b43 (patch) | |
| tree | aacb8e0e82eed17e61860ba7a62dd3a36fdf83af | |
| parent | [tests] remove direct testing on JSONRPCException from individual test cases (diff) | |
| download | discoin-677d893ff758b61f66203730da224bd7ef8f0b43.tar.xz discoin-677d893ff758b61f66203730da224bd7ef8f0b43.zip | |
[tests] do not allow assert_raises_message to be called with JSONRPCException
| -rw-r--r-- | test/functional/test_framework/util.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index 44d7e04a8..ed35bf576 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']) |