Skip to content

Commit

Permalink
add test for passgen
Browse files Browse the repository at this point in the history
  • Loading branch information
deepattic committed Nov 13, 2024
1 parent 0b9f286 commit 78cf1e1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Empty file added tests/__init__.py
Empty file.
13 changes: 13 additions & 0 deletions tests/test_password_generation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import random
from libwardenpy.passgen import generate_password

def test_default_password_generation() -> None:
default_password = generate_password()
assert len(default_password) == 14

def test_password_generation_with_length() -> None:
length = random.randint(1,255)
password = generate_password(length)
assert len(password) == length


0 comments on commit 78cf1e1

Please sign in to comment.