1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 15:38:11 +00:00

tests: use improved API in authorize_coinjoin test

This commit is contained in:
matejcik 2020-08-05 15:46:43 +02:00
parent 769ccf52c6
commit a94c0d074d

View File

@ -431,8 +431,7 @@ def test_multisession_authorization(client):
# Open a second session. # Open a second session.
session_id1 = client.session_id session_id1 = client.session_id
client.session_id = None client.init_device(new_session=True)
client.init_device()
# Authorize CoinJoin with www.example2.com in session 2. # Authorize CoinJoin with www.example2.com in session 2.
btc.authorize_coinjoin( btc.authorize_coinjoin(
@ -474,8 +473,7 @@ def test_multisession_authorization(client):
# Switch back to the first session. # Switch back to the first session.
session_id2 = client.session_id session_id2 = client.session_id
client.session_id = session_id1 client.init_device(session_id=session_id1)
client.init_device()
# Requesting a preauthorized ownership proof for www.example1.com should succeed in session 1. # Requesting a preauthorized ownership proof for www.example1.com should succeed in session 1.
ownership_proof, _ = btc.get_ownership_proof( ownership_proof, _ = btc.get_ownership_proof(
@ -521,8 +519,7 @@ def test_multisession_authorization(client):
) )
# Switch to the second session. # Switch to the second session.
client.session_id = session_id2 client.init_device(session_id=session_id2)
client.init_device()
# Requesting a preauthorized ownership proof for www.example2.com should still succeed in session 2. # Requesting a preauthorized ownership proof for www.example2.com should still succeed in session 2.
ownership_proof, _ = btc.get_ownership_proof( ownership_proof, _ = btc.get_ownership_proof(