Skip to content

Commit

Permalink
tests: fix StackItem.as_address test (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje authored Sep 16, 2024
1 parent 912697f commit 644388e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/api/test_noderpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,10 +794,8 @@ def test_as_address(self):
script_hash = utils.address_to_script_hash(addr)

si = api.StackItem(api.StackItemType.BYTE_STRING, script_hash.to_array())
value = si.as_uint160()

self.assertIsInstance(value, types.UInt160)
self.assertEqual(script_hash, value)
value = si.as_address()
self.assertEqual(addr, value)

with self.assertRaises(ValueError) as context:
self.si_int.as_address()
Expand Down

0 comments on commit 644388e

Please sign in to comment.