mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-17 19:49:12 +00:00
Enhance seed entry prompts with masking and clear screen
This commit is contained in:
@@ -38,6 +38,7 @@ def test_prompt_seed_words_valid(monkeypatch):
|
||||
words = phrase.split()
|
||||
|
||||
inputs = iter(words + ["y"] * len(words))
|
||||
monkeypatch.setattr(seed_prompt, "masked_input", lambda *_: next(inputs))
|
||||
monkeypatch.setattr("builtins.input", lambda *_: next(inputs))
|
||||
|
||||
result = seed_prompt.prompt_seed_words(len(words))
|
||||
@@ -52,6 +53,7 @@ def test_prompt_seed_words_invalid_word(monkeypatch):
|
||||
words = phrase.split()
|
||||
# Insert an invalid word for the first entry then the correct one
|
||||
inputs = iter(["invalid"] + [words[0]] + words[1:] + ["y"] * len(words))
|
||||
monkeypatch.setattr(seed_prompt, "masked_input", lambda *_: next(inputs))
|
||||
monkeypatch.setattr("builtins.input", lambda *_: next(inputs))
|
||||
|
||||
result = seed_prompt.prompt_seed_words(len(words))
|
||||
|
Reference in New Issue
Block a user