Skip to content

Commit c0a5a67

Browse files
committed
GH-6 # fix tests
1 parent e979388 commit c0a5a67

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

justfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ fix-qa:
77
ruff format
88

99
test:
10-
pytest
10+
poetry run pytest

src/init_scripts/init_db_with_password_file.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
ROCKYOU_DOWNLOAD_URL = "https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt"
2828

2929

30-
def init_db(file_path: str, db_client: Redis, password_count: int) -> int:
30+
def init_db(file_path: str, db_client: Redis, password_count: int = 0) -> int:
3131
"""Return the number of password inserted in db"""
3232
processed = 0
3333
hasher = PasswordHasher()
@@ -76,7 +76,10 @@ def init_db(file_path: str, db_client: Redis, password_count: int) -> int:
7676
settings = Settings()
7777
password_count = 0
7878
with rich.progress.open(
79-
password_path, encoding="latin-1", description="[orange3]Determining password count...", transient=True,
79+
password_path,
80+
encoding="latin-1",
81+
description="[orange3]Determining password count...",
82+
transient=True,
8083
) as file:
8184
for line in file:
8285
password_count += 1

0 commit comments

Comments
 (0)