Add tests for secret mode initialization

This commit is contained in:
thePR0M3TH3AN
2025-08-06 19:23:56 -04:00
parent 92142a3e1b
commit d92385eff9
3 changed files with 80 additions and 2 deletions

View File

@@ -538,6 +538,10 @@ class PasswordManager:
)
)
# Ensure managers are initialized for the newly created profile
if self.config_manager is None:
self.initialize_managers()
except Exception as e:
logger.error(f"Error adding new seed profile: {e}", exc_info=True)
print(colored(f"Error: Failed to add new seed profile: {e}", "red"))
@@ -960,6 +964,10 @@ class PasswordManager:
print(colored("Invalid choice. Exiting.", "red"))
sys.exit(1)
# Some seed loading paths may not initialize managers; ensure they exist
if self.config_manager is None:
self.initialize_managers()
def setup_existing_seed(
self,
method: Literal["paste", "words"] = "paste",