Skip to content

Commit

Permalink
adjusted test to cover bugfix in commit 3eba4e4
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean Do committed Aug 5, 2024
1 parent 3eba4e4 commit 749bd06
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tests/pages/home_pages/test_sign_message_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,22 @@ def test_sign_message_at_address(mocker, m5stickv, tdata):
mocker.patch.object(
message_signer,
"capture_qr_code",
new=lambda: ("signmessage m/84h/1h/0h/0/3 ascii:a test message", FORMAT_NONE),
new=lambda: (
"signmessage m/84h/1h/0h/0/3 ascii:a test message with a colon ':' character.",
FORMAT_NONE,
),
)
message_signer.sign_message()

ctx.display.draw_hcentered_text.assert_has_calls(
[mocker.call("Message:", 10, theme.highlight_color)]
)
ctx.display.draw_hcentered_text.assert_has_calls(
[mocker.call("a test message", mocker.ANY, max_lines=10)]
[
mocker.call(
"a test message with a colon ':' character.", mocker.ANY, max_lines=10
)
]
)
ctx.display.draw_hcentered_text.assert_has_calls(
[mocker.call("Address:", mocker.ANY, theme.highlight_color)]
Expand All @@ -261,7 +268,7 @@ def test_sign_message_at_address(mocker, m5stickv, tdata):
[mocker.call("3. bc1qgl..cn3", mocker.ANY)],
)
message_signer.display_qr_codes.assert_called_once_with(
"HzRkfdy2sqvszgCn1jLkq3KfqP6Zd1wwG0v+95zfIz0WNizoXjjFBmB7ZxOHXSj4qAhwoNgUPJHDqzFaOq30URA=",
"IHx1+DGW83eZZpV8rOT/9l/yUYa2ncmCr/Mnq7XBJmmyFCUWKceHZQqUZAk60XuwlBox3d3hAa4FU59AXOjbALo=",
0,
"Signed Message",
)

0 comments on commit 749bd06

Please sign in to comment.