mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-11-09 14:22:26 +00:00
Implement TOTP entry support
This commit is contained in:
1 parent
aba3ca3bbb
commit
d1d20759fd
3 files changed
+143
-24
No files matched your search
@@ -1,6 +1,8 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from tempfile import TemporaryDirectory
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
from helpers import create_vault, TEST_SEED, TEST_PASSWORD
|
||||
|
||||
@@ -49,6 +51,10 @@ def test_round_trip_entry_types(method, expected_type):
|
||||
|
||||
if method == "add_entry":
|
||||
index = entry_mgr.add_entry("example.com", 8)
|
||||
elif method == "add_totp":
|
||||
with patch.object(enc_mgr, "decrypt_parent_seed", return_value=TEST_SEED):
|
||||
entry_mgr.add_totp("example", 0)
|
||||
index = 0
|
||||
else:
|
||||
with pytest.raises(NotImplementedError):
|
||||
getattr(entry_mgr, method)()
|
||||
|
||||
Reference in new issue
Block a user