Port 'send_etc.test' from 'zemu' to 'ragger'
- Port test config from 'zemu' - Copy snapshots from 'zemu' - Adapt conftest.py to support library mode - Add a new test step in the workflow
This commit is contained in:
32
tests/ragger/test_clone.py
Normal file
32
tests/ragger/test_clone.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from web3 import Web3
|
||||
|
||||
from ragger.backend import BackendInterface
|
||||
from ragger.firmware import Firmware
|
||||
from ragger.navigator import Navigator
|
||||
|
||||
from test_sign import common
|
||||
|
||||
|
||||
# Values used across all tests
|
||||
ADDR = bytes.fromhex("5a321744667052affa8386ed49e00ef223cbffc3")
|
||||
BIP32_PATH = "m/44'/1001'/0'/0/0"
|
||||
NONCE = 68
|
||||
GAS_PRICE = 13
|
||||
GAS_LIMIT = 21000
|
||||
VALUE = 0.31415
|
||||
|
||||
|
||||
# Transfer on Clone app
|
||||
def test_clone_thundercore(firmware: Firmware,
|
||||
backend: BackendInterface,
|
||||
navigator: Navigator,
|
||||
test_name: str):
|
||||
tx_params: dict = {
|
||||
"nonce": NONCE,
|
||||
"gasPrice": Web3.to_wei(GAS_PRICE, 'gwei'),
|
||||
"gas": GAS_LIMIT,
|
||||
"to": ADDR,
|
||||
"value": Web3.to_wei(VALUE, "ether"),
|
||||
"chainId": 108
|
||||
}
|
||||
common(firmware, backend, navigator, tx_params, test_name, BIP32_PATH)
|
||||
Reference in New Issue
Block a user