Update Readme Files
This commit is contained in:
18
tests/test_cli2.py
Normal file
18
tests/test_cli2.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from salt import hash_password
|
||||
from salt2 import main
|
||||
|
||||
|
||||
def test_main_generate_with_algorithm_flag():
|
||||
"""Verify salt2 CLI accepts --algorithm flag."""
|
||||
assert main(["generate", "--algorithm", "pbkdf2", "secret"]) == 0
|
||||
|
||||
|
||||
def test_main_verify_with_algorithm_flag():
|
||||
"""Verify salt2 CLI verify accepts --algorithm flag."""
|
||||
salt, hashed = hash_password("secret", algorithm="pbkdf2")
|
||||
assert main(["verify", "--algorithm", "pbkdf2", "secret", salt, hashed]) == 0
|
||||
|
||||
|
||||
def test_main_list_algorithms_command():
|
||||
"""Verify salt2 CLI has list-algorithms command."""
|
||||
assert main(["list-algorithms"]) == 0
|
||||
Reference in New Issue
Block a user