Adapt test to provide certificate APDU
This commit is contained in:
@@ -13,6 +13,7 @@ disable = C0114, # missing-module-docstring
|
||||
R0912, # too-many-branches
|
||||
R0913, # too-many-arguments
|
||||
R0914, # too-many-locals
|
||||
R0915, # too-many-statements
|
||||
W0603, # global-statement
|
||||
E0401 # import-error
|
||||
extension-pkg-whitelist=hid
|
||||
|
||||
@@ -34,6 +34,7 @@ def common(firmware: Firmware, app_client: EthAppClient) -> int:
|
||||
|
||||
if firmware == Firmware.NANOS:
|
||||
pytest.skip("Not supported on LNS")
|
||||
|
||||
challenge = app_client.get_challenge()
|
||||
return ResponseParser.challenge(challenge.data)
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ from ragger.backend import BackendInterface
|
||||
|
||||
from client.client import EthAppClient, StatusWord
|
||||
|
||||
|
||||
def test_provide_erc20_token(backend: BackendInterface):
|
||||
|
||||
app_client = EthAppClient(backend)
|
||||
@@ -21,7 +20,7 @@ def test_provide_erc20_token_error(backend: BackendInterface):
|
||||
|
||||
addr = bytes.fromhex("e41d2489571d322189246dafa5ebde1f4699f498")
|
||||
sign = bytes.fromhex("deadbeef")
|
||||
with pytest.raises(ExceptionRAPDU) as e:
|
||||
with pytest.raises(ExceptionRAPDU) as err:
|
||||
app_client.provide_token_metadata("ZRX", addr, 18, 1, sign)
|
||||
|
||||
assert e.value.status == StatusWord.INVALID_DATA
|
||||
assert err.value.status == StatusWord.INVALID_DATA
|
||||
|
||||
@@ -70,6 +70,7 @@ def common_test_nft(firmware: Firmware,
|
||||
collec.addr,
|
||||
get_selector_from_data(data),
|
||||
collec.chain_id)
|
||||
|
||||
app_client.provide_nft_metadata(collec.name, collec.addr, collec.chain_id)
|
||||
tx_params = {
|
||||
"nonce": NONCE,
|
||||
|
||||
Reference in New Issue
Block a user