Skip to content

Commit

Permalink
[Tests] Add SELL and FUND tests for LTC
Browse files Browse the repository at this point in the history
[Tests] Move assert_exchange_is_started to client
[Tests] Reuse LTC tests for legacy subcommands, delete dedicated tests
[Tests] Remove legacy subcommands from currency tests
  • Loading branch information
fbeutin-ledger committed Jun 27, 2024
1 parent 8be8d7e commit 7d9ec8f
Show file tree
Hide file tree
Showing 139 changed files with 106 additions and 87 deletions.
10 changes: 9 additions & 1 deletion test/python/apps/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from ragger.backend.interface import BackendInterface, RAPDU

from ..utils import handle_lib_call_start_or_stop, int_to_minimally_sized_bytes, prefix_with_len_custom
from ..utils import handle_lib_call_start_or_stop, int_to_minimally_sized_bytes, prefix_with_len_custom, get_version_from_makefile
from .exchange_transaction_builder import SubCommand

MAX_CHUNK_SIZE = 255
Expand Down Expand Up @@ -167,3 +167,11 @@ def start_signing_transaction(self) -> RAPDU:
if rapdu.status == 0x9000:
handle_lib_call_start_or_stop(self._client)
return rapdu

def assert_exchange_is_started(self):
# We don't care at all for the subcommand / rate
version = self.get_version().data
major, minor, patch = get_version_from_makefile()
assert version[0] == major
assert version[1] == minor
assert version[2] == patch
183 changes: 97 additions & 86 deletions test/python/apps/exchange_test_runner.py

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Binary file added test/python/snapshots/nanos/test_ltc_sell/00003.png
Binary file added test/python/snapshots/nanos/test_ltc_sell/00005.png
Binary file added test/python/snapshots/nanos/test_ltc_swap/00002.png
Binary file added test/python/snapshots/nanos/test_ltc_swap/00004.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file added test/python/snapshots/nanosp/test_ltc_swap/00002.png
Binary file added test/python/snapshots/nanosp/test_ltc_swap/00004.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file added test/python/snapshots/nanox/test_ltc_fund/00002.png
Binary file added test/python/snapshots/nanox/test_ltc_fund/00004.png
Binary file added test/python/snapshots/nanox/test_ltc_sell/00003.png
Binary file added test/python/snapshots/nanox/test_ltc_sell/00005.png
Binary file added test/python/snapshots/nanox/test_ltc_swap/00002.png
Binary file added test/python/snapshots/nanox/test_ltc_swap/00004.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.

0 comments on commit 7d9ec8f

Please sign in to comment.