Update Readme Files
This commit is contained in:
51
tests/test_integration.py
Normal file
51
tests/test_integration.py
Normal file
@@ -0,0 +1,51 @@
|
||||
"""Integration tests for multi-algorithm password hashing."""
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def test_pbkdf2_cli_integration():
|
||||
"""Test PBKDF2 end-to-end via CLI."""
|
||||
result = subprocess.run(
|
||||
[sys.executable, "salt.py", "hash", "--algorithm", "pbkdf2", "test123"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
assert result.returncode == 0
|
||||
assert "Salt:" in result.stdout
|
||||
assert "Hash:" in result.stdout
|
||||
|
||||
|
||||
def test_argon2_cli_integration():
|
||||
"""Test Argon2 end-to-end via CLI."""
|
||||
result = subprocess.run(
|
||||
[sys.executable, "salt.py", "hash", "--algorithm", "argon2", "test123"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
assert result.returncode == 0
|
||||
assert "Hash:" in result.stdout
|
||||
|
||||
|
||||
def test_bcrypt_cli_integration():
|
||||
"""Test bcrypt end-to-end via CLI."""
|
||||
result = subprocess.run(
|
||||
[sys.executable, "salt.py", "hash", "--algorithm", "bcrypt", "test123"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
assert result.returncode == 0
|
||||
assert "Hash:" in result.stdout
|
||||
|
||||
|
||||
def test_list_algorithms_integration():
|
||||
"""Test list-algorithms command."""
|
||||
result = subprocess.run(
|
||||
[sys.executable, "salt.py", "list-algorithms"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
assert result.returncode == 0
|
||||
assert "argon2" in result.stdout
|
||||
assert "bcrypt" in result.stdout
|
||||
assert "pbkdf2" in result.stdout
|
||||
Reference in New Issue
Block a user