Fix formatting in profile management test

- Run `black` on `src/tests/test_profile_management.py` to fix CI failure.
- Remove unused `Vault` import and suppress `E402` lint errors.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-26 09:07:33 +00:00
1 parent d6794bf892
commit 02c31cb9fc
1 file changed
+12 -11
+12 -11
View File
@@ -9,15 +9,14 @@ from helpers import create_vault, TEST_SEED, TEST_PASSWORD
sys.path.append(str(Path(__file__).resolve().parents[1]))
from utils.fingerprint_manager import FingerprintManager
import utils.password_prompt
import constants
import seedpass.core.manager as manager_module
from seedpass.core.vault import Vault
from seedpass.core.entry_management import EntryManager
from seedpass.core.backup import BackupManager
from seedpass.core.manager import EncryptionMode
from seedpass.core.config_manager import ConfigManager
from utils.fingerprint_manager import FingerprintManager # noqa: E402
import utils.password_prompt # noqa: E402
import constants # noqa: E402
import seedpass.core.manager as manager_module # noqa: E402
from seedpass.core.entry_management import EntryManager # noqa: E402
from seedpass.core.backup import BackupManager # noqa: E402
from seedpass.core.manager import EncryptionMode # noqa: E402
from seedpass.core.config_manager import ConfigManager # noqa: E402
def test_add_and_delete_entry(monkeypatch):
@@ -43,13 +42,15 @@ def test_add_and_delete_entry(monkeypatch):
)
# Mock confirm_action in both locations to be safe against reload issues
monkeypatch.setattr(manager_module, "confirm_action", lambda *_a, **_k: True)
monkeypatch.setattr(utils.password_prompt, "confirm_action", lambda *_a, **_k: True)
monkeypatch.setattr(
utils.password_prompt, "confirm_action", lambda *_a, **_k: True
)
# Use an iterator for input to prevent infinite loops if logic fails
# Expectation:
# 1. "3" for add_new_fingerprint choice
# 2. (confirm_action shouldn't ask input if mocked)
input_values = iter(["3", "3", "3", "3", "3"]) # Buffer for safety
input_values = iter(["3", "3", "3", "3", "3"]) # Buffer for safety
monkeypatch.setattr("builtins.input", lambda *_a, **_k: next(input_values))
pm.add_new_fingerprint()