Skip to content

Commit ba310d1

Browse files
tecnovertFuzzbawls
authored andcommitted
Test for hex strings and remove stray newline from rpc_named_arguments.
Github-Pull: #2779 Rebased-From: 8488f7e
1 parent 2b244ba commit ba310d1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/functional/rpc_blockchain.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,12 @@ def _test_getblock(self):
114114

115115
# Test getblock verbosity
116116
besthash = node.getbestblockhash()
117-
assert(isinstance(node.getblock(blockhash=besthash, verbose=False), str))
118-
assert(isinstance(node.getblock(blockhash=besthash, verbosity=0), str))
119-
assert(isinstance(node.getblock(besthash, 1)['tx'][0], str))
120-
assert(isinstance(node.getblock(besthash, True)['tx'][0], str))
121-
assert('vin' in node.getblock(besthash, 2)['tx'][0])
117+
assert_is_hex_string(node.getblock(blockhash=besthash, verbose=False))
118+
assert_is_hex_string(node.getblock(blockhash=besthash, verbosity=0))
119+
120+
assert_is_hash_string(node.getblock(besthash, 1)['tx'][0])
121+
assert_is_hash_string(node.getblock(besthash, True)['tx'][0])
122+
assert_is_hex_string(node.getblock(besthash, 2)['tx'][0]['vin'][0]['coinbase']);
122123

123124

124125
if __name__ == '__main__':

test/functional/rpc_named_arguments.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,5 @@ def run_test(self):
3030
assert_equal(node.echo(arg9=None), [None]*10)
3131
assert_equal(node.echo(arg0=0,arg3=3,arg9=9), [0] + [None]*2 + [3] + [None]*5 + [9])
3232

33-
3433
if __name__ == '__main__':
3534
NamedArgumentTest().main()

0 commit comments

Comments
 (0)