Browse Source

CmdTestAutosignBase: simplify mnemonic entry

The MMGen Project 1 week ago
parent
commit
031ae051f9
2 changed files with 7 additions and 2 deletions
  1. 2 2
      test/cmdtest_d/autosign.py
  2. 5 0
      test/cmdtest_d/include/input.py

+ 2 - 2
test/cmdtest_d/autosign.py

@@ -47,7 +47,7 @@ from ..include.common import (
 from .include.common import ref_dir, dfl_words_file, dfl_bip39_file
 
 from .base import CmdTestBase
-from .include.input import stealth_mnemonic_entry
+from .include.input import mnemonic_entry
 
 class CmdTestAutosignBase(CmdTestBase):
 	networks     = ('btc',)
@@ -238,7 +238,7 @@ class CmdTestAutosignBase(CmdTestBase):
 					'Type a number.*: ',
 					str(mne.entry_modes.index(entry_mode) + 1),
 					regex = True)
-			stealth_mnemonic_entry(t, mne, mn, entry_mode)
+			mnemonic_entry(t, mne, mn)
 
 		t.written_to_file('Autosign wallet')
 

+ 5 - 0
test/cmdtest_d/include/input.py

@@ -14,6 +14,11 @@ import time
 from ...include.common import getrand
 from .common import randbool
 
+def mnemonic_entry(t, mne, mn):
+	p_ok, _ = mne.word_prompt
+	for wnum, word in enumerate(mn, 1):
+		t.expect(p_ok.format(wnum), word + ' ')
+
 def stealth_mnemonic_entry(t, mne, mn, entry_mode, pad_entry=False):
 
 	def pad_mnemonic(mn, ss_len):