mirror of
https://github.com/cryptoadvance/specter-desktop.git
synced 2026-08-13 12:33:29 +02:00
Remove unused import and improve checksum regex pattern
Co-authored-by: k9ert <117085+k9ert@users.noreply.github.com>
This commit is contained in:
parent
f4932d8613
commit
3890b44c72
1 changed files with 4 additions and 3 deletions
|
|
@ -1,4 +1,3 @@
|
|||
from asyncio.streams import FlowControlMixin
|
||||
import json
|
||||
import random
|
||||
import re
|
||||
|
|
@ -399,11 +398,13 @@ def test_account_map_combined_descriptor(funded_hot_wallet_1: Wallet):
|
|||
|
||||
# Should not have single-branch /0/* or /1/* in the descriptor
|
||||
# Check that it doesn't end with /0/* followed by checksum or /1/* followed by checksum
|
||||
assert not re.search(r'/0/\*#[a-z0-9]+$', descriptor_str), (
|
||||
# Note: Descriptor checksums use charset "qpzry9x8gf2tvdw0s3jn54khce6mua7l" (lowercase + digits only)
|
||||
# but we include uppercase for future-proofing
|
||||
assert not re.search(r'/0/\*#[a-zA-Z0-9]+$', descriptor_str), (
|
||||
f"Descriptor should not end with /0/* (receive only), "
|
||||
f"got: {descriptor_str}"
|
||||
)
|
||||
assert not re.search(r'/1/\*#[a-z0-9]+$', descriptor_str), (
|
||||
assert not re.search(r'/1/\*#[a-zA-Z0-9]+$', descriptor_str), (
|
||||
f"Descriptor should not end with /1/* (change only), "
|
||||
f"got: {descriptor_str}"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue