diff --git a/tests/application_client/flow_command_sender.py b/tests/application_client/flow_command_sender.py index 59f1984a..5ff7bd7f 100644 --- a/tests/application_client/flow_command_sender.py +++ b/tests/application_client/flow_command_sender.py @@ -178,6 +178,7 @@ def get_slot(self, slot: int) -> RAPDU: @contextmanager def set_slot( + *, self, slot: int, address: str, @@ -225,6 +226,7 @@ def get_public_key_with_confirmation( @contextmanager def sign_tx( + *, self, path: str, curve: CurveChoice, diff --git a/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00000.png b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00000.png new file mode 100644 index 00000000..de71cda0 Binary files /dev/null and b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00000.png differ diff --git a/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00001.png b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00001.png new file mode 100644 index 00000000..f9c726d5 Binary files /dev/null and b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00001.png differ diff --git a/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00002.png b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00002.png new file mode 100644 index 00000000..3cde6b45 Binary files /dev/null and b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00002.png differ diff --git a/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00003.png b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00003.png new file mode 100644 index 00000000..ccb2488b Binary files /dev/null and b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00003.png differ diff --git a/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00004.png b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00004.png new file mode 100644 index 00000000..02730c37 Binary files /dev/null and b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00004.png differ diff --git a/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00005.png b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00005.png new file mode 100644 index 00000000..1b00ed4f Binary files /dev/null and b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00005.png differ diff --git a/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00006.png b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00006.png new file mode 100644 index 00000000..5b445935 Binary files /dev/null and b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00006.png differ diff --git a/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00007.png b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00007.png new file mode 100644 index 00000000..f5447392 Binary files /dev/null and b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00007.png differ diff --git a/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00008.png b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00008.png new file mode 100644 index 00000000..ca7393d1 Binary files /dev/null and b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00008.png differ diff --git a/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00009.png b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00009.png new file mode 100644 index 00000000..392165d4 Binary files /dev/null and b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00009.png differ diff --git a/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00010.png b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00010.png new file mode 100644 index 00000000..f8cefae9 Binary files /dev/null and b/tests/snapshots/stax/test_transaction_manifest/SCO.17-Mainnet/00010.png differ diff --git a/tests/test_sign_cmd.py b/tests/test_sign_cmd.py index 53bc1e88..d038ac13 100644 --- a/tests/test_sign_cmd.py +++ b/tests/test_sign_cmd.py @@ -41,7 +41,7 @@ def _check_transaction( message = bytes.fromhex(transaction) # Send the APDU (Asynchronous) - with client.sign_tx(path, curve, message, hash_t, signable_type): + with client.sign_tx(path=path, curve=curve, transaction=message, hash_t=hash_t, hint=signable_type): util_navigate(firmware, navigator, test_name, "APPROVE_SIGN", timeout) # Send the APDU (Asynchronous) @@ -335,7 +335,7 @@ def test_transaction_refused(firmware, backend, navigator, test_name): # Send the APDU (Asynchronous) with pytest.raises(ExceptionRAPDU) as err: - with client.sign_tx(path, curve, message, hash_t, scriptHash): + with client.sign_tx(path=path, curve=curve, transaction=message, hash_t=hash_t, hint=scriptHash): util_navigate(firmware, navigator, test_name, "REJECT_SIGN") # Assert we have received a refusal @@ -443,7 +443,7 @@ def test_message_invalid(self, firmware, backend, navigator, test_name): # Send the APDU (Asynchronous) with pytest.raises(ExceptionRAPDU) as err: - with client.sign_tx(path, cfg["curve"], message, cfg["hash"], "message"): + with client.sign_tx(path=path, curve=cfg["curve"], transaction=message, hash_t=cfg["hash"], hint="message"): pass assert(str(err) == "") part += 1 @@ -466,7 +466,7 @@ def test_arbitrary_transaction_signing_fail_in_no_expert_mode(self, firmware, ba part = 0 # Send the APDU and check the results with pytest.raises(ExceptionRAPDU) as err: - with client.sign_tx(path, cfg["curve"], bytes.fromhex(cfg["tx"]), cfg["hash"], "arbitrary"): + with client.sign_tx(path=path, curve=cfg["curve"], transaction=bytes.fromhex(cfg["tx"]), hash_t=cfg["hash"], hint="arbitrary"): pass assert(str(err) == "") diff --git a/tests/test_slots.py b/tests/test_slots.py index 2fbc4ce2..f7b2f22d 100644 --- a/tests/test_slots.py +++ b/tests/test_slots.py @@ -154,7 +154,7 @@ def test_get_slot_refused(firmware, backend, navigator, test_name): # Send the APDU (Asynchronous) with pytest.raises(ExceptionRAPDU) as err: - with client.set_slot(slot, address, path, curve, hash_t): + with client.set_slot(slot=slot, address=address, path=path, curve=curve, hash_t=hash_t): util_navigate(firmware, navigator, test_name, "REJECT_SLOT") # Assert we have received a refusal diff --git a/tests/utils.py b/tests/utils.py index df7ecce0..48607dc9 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -107,7 +107,7 @@ def util_set_slot( """ Function to Set Slot parameters """ # Send the APDU (Asynchronous) - with client.set_slot(slot, address, path, curve, hash_t): + with client.set_slot(slot=slot, address=address, path=path, curve=curve, hash_t=hash_t): util_navigate(firmware, navigator, test_name, "APPROVE_SLOT") # Check the status (Asynchronous)