Update tests for entries schema

This commit is contained in:
thePR0M3TH3AN
2025-07-02 23:09:10 -04:00
parent a00d97b076
commit 609751bf66
13 changed files with 75 additions and 29 deletions

View File

@@ -6,6 +6,7 @@ from hypothesis import given, strategies as st, settings
sys.path.append(str(Path(__file__).resolve().parents[1]))
from password_manager.password_generation import PasswordGenerator
from password_manager.entry_types import EntryType
class DummyEnc:
@@ -32,8 +33,10 @@ def make_generator():
@settings(deadline=None)
def test_password_properties(length, index):
pg = make_generator()
entry_type = EntryType.PASSWORD.value
pw1 = pg.generate_password(length=length, index=index)
pw2 = pg.generate_password(length=length, index=index)
assert entry_type == "password"
assert pw1 == pw2
assert len(pw1) == length