Skip to content

Commit

Permalink
Namecoin: Add missing name_op field in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Oct 1, 2018
1 parent 4f83182 commit 901be4b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions electrum_nmc/tests/test_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def test_tx_unsigned(self):
'prevout_n': 0,
'scriptPubKey': '76a914230ac37834073a42146f11ef8414ae929feaafc388ac',
'type': TYPE_ADDRESS,
'value': 1000000}],
'value': 1000000,
'name_op': None}], # name_op=None added by Namecoin
'partial': True,
'segwit_ser': False,
'version': 1,
Expand All @@ -92,7 +93,8 @@ def test_tx_unsigned(self):
self.assertEqual(tx.as_dict(), {'hex': unsigned_blob, 'complete': False, 'final': True})
#self.assertEqual(tx.get_outputs(), [('14CHYaaByjJZpx4oHBpfDMdqhTyXnZ3kVs', 1000000)])
# Converted to Namecoin using `contrib/convertAddress.py` from Namecoin Core.
self.assertEqual(tx.get_outputs(), [('MymekE5Au7Q8MVKJZ19ERsnkRhNanZco6s', 1000000)])
# name_op=None added by Namecoin
self.assertEqual(tx.get_outputs(), [('MymekE5Au7Q8MVKJZ19ERsnkRhNanZco6s', 1000000, None)])
#self.assertEqual(tx.get_output_addresses(), ['14CHYaaByjJZpx4oHBpfDMdqhTyXnZ3kVs'])
# Converted to Namecoin using `contrib/convertAddress.py` from Namecoin Core.
self.assertEqual(tx.get_output_addresses(), ['MymekE5Au7Q8MVKJZ19ERsnkRhNanZco6s'])
Expand Down Expand Up @@ -135,7 +137,8 @@ def test_tx_signed(self):
'prevout_n': 0,
'scriptPubKey': '76a914230ac37834073a42146f11ef8414ae929feaafc388ac',
'type': TYPE_ADDRESS,
'value': 1000000}],
'value': 1000000,
'name_op': None}], # name_op=None added by Namecoin
'partial': False,
'segwit_ser': False,
'version': 1
Expand Down

0 comments on commit 901be4b

Please sign in to comment.