Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Commit ab285d9

Browse files
committed
Ensures that the correct trytes are sent to the sendTrytes command to replay the bundle.
1 parent 775a37b commit ab285d9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

test/commands/extended/replay_bundle_test.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,10 +593,20 @@ def test_happy_path(self):
593593
})
594594

595595
send_trytes_response = {
596-
'trytes': bundle.as_tryte_strings(head_to_tail=True),
596+
'trytes': bundle.as_tryte_strings(),
597597
}
598598

599-
mock_send_trytes = mock.Mock(return_value=send_trytes_response)
599+
def mock_send_trytes(self,request):
600+
"""
601+
Ensures that the correct trytes are sent to the ``sendTrytes`` command
602+
to replay the bundle.
603+
604+
References:
605+
- https://github.com/iotaledger/iota.lib.py/issues/74
606+
"""
607+
from unittest import TestCase
608+
TestCase().assertEqual(request['trytes'], send_trytes_response['trytes'])
609+
return send_trytes_response
600610

601611
with mock.patch(
602612
'iota.commands.extended.get_bundles.GetBundlesCommand._execute',

0 commit comments

Comments
 (0)