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