mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-03 19:31:02 +00:00
fix(tests): Adjust the expected error message
This commit is contained in:
parent
da2ef8ed41
commit
e5e3ad21b2
@ -1,4 +1,3 @@
|
|||||||
import re
|
|
||||||
from hashlib import sha256
|
from hashlib import sha256
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
@ -63,10 +62,7 @@ def hash_tx(data: bytes) -> bytes:
|
|||||||
def _check_error_message(value: bytes, model: str, message: str):
|
def _check_error_message(value: bytes, model: str, message: str):
|
||||||
if model != "1":
|
if model != "1":
|
||||||
if value is None:
|
if value is None:
|
||||||
assert re.match(
|
assert message == "Failed to decode message: Missing"
|
||||||
r"^Failed to decode message: Required field '\w+' was not received$",
|
|
||||||
message,
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
assert message == "Provided prev_hash is invalid."
|
assert message == "Provided prev_hash is invalid."
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user