mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-11-06 12:52:04 +00:00
test: check list_entries on empty index
This commit is contained in:
1 parent
c0f7584e54
commit
02d1edb6d7
1 file changed
+19
@@ -0,0 +1,19 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from tempfile import TemporaryDirectory
|
||||
from cryptography.fernet import Fernet
|
||||
|
||||
sys.path.append(str(Path(__file__).resolve().parents[1]))
|
||||
|
||||
from password_manager.encryption import EncryptionManager
|
||||
from password_manager.entry_management import EntryManager
|
||||
|
||||
|
||||
def test_list_entries_empty():
|
||||
with TemporaryDirectory() as tmpdir:
|
||||
key = Fernet.generate_key()
|
||||
enc_mgr = EncryptionManager(key, Path(tmpdir))
|
||||
entry_mgr = EntryManager(enc_mgr, Path(tmpdir))
|
||||
|
||||
entries = entry_mgr.list_entries()
|
||||
assert entries == []
|
||||
Reference in new issue
Block a user