refactor asserts

This commit is contained in:
2025-03-09 07:39:29 -05:00
parent 88b533c27b
commit 9fdf79842d
12 changed files with 84 additions and 64 deletions

View File

@@ -27,13 +27,13 @@ def test_encode_decode_base64(passcode_len):
(KeypadSize(numb_of_keys=8, attrs_per_key=11), 12),
])
def test_decode_mask(keypad_size, max_nkode_len):
customer = CustomerAttributes.new(keypad_size)
customer = CustomerAttributes.create(keypad_size)
passcode_entry = generate_random_nonrepeating_list(
keypad_size.numb_of_attrs,
max_val=keypad_size.numb_of_attrs)[:4]
passcode_values = [customer.attr_vals[idx] for idx in passcode_entry]
set_vals = customer.set_vals
user_keys = UserCipherKeys.new(keypad_size, set_vals, max_nkode_len)
user_keys = UserCipherKeys.create(keypad_size, set_vals, max_nkode_len)
passcode = user_keys.encipher_nkode(passcode_entry, customer)
orig_passcode_set_vals = [customer.get_attr_set_val(attr) for attr in passcode_values]