[GEMINI] Update test imports and mock paths to point to ctf.cli package
This commit is contained in:
@@ -99,7 +99,7 @@ def test_cli_crack_steghide_success(tmp_path):
|
||||
payload=b"flag{cli_steg_preview}"
|
||||
)
|
||||
|
||||
with patch("ctf.cli_steg.crack_steghide", return_value=mock_result):
|
||||
with patch("ctf.cli.steg.crack_steghide", return_value=mock_result):
|
||||
res = runner.invoke(cli, ["steg", "crack-steghide", str(mock_file), "-w", str(wordlist_file)])
|
||||
assert res.exit_code == 0
|
||||
assert "Successfully cracked!" in res.output
|
||||
@@ -127,7 +127,7 @@ def test_cli_crack_steghide_success_output_file(tmp_path):
|
||||
payload=b"written_file_content"
|
||||
)
|
||||
|
||||
with patch("ctf.cli_steg.crack_steghide", return_value=mock_result):
|
||||
with patch("ctf.cli.steg.crack_steghide", return_value=mock_result):
|
||||
res = runner.invoke(cli, ["steg", "crack-steghide", str(mock_file), "-w", str(wordlist_file), "-o", str(out_file)])
|
||||
assert res.exit_code == 0
|
||||
assert "Successfully cracked!" in res.output
|
||||
@@ -152,7 +152,7 @@ def test_cli_crack_steghide_failure(tmp_path):
|
||||
error_message="Password not found in wordlist."
|
||||
)
|
||||
|
||||
with patch("ctf.cli_steg.crack_steghide", return_value=mock_result):
|
||||
with patch("ctf.cli.steg.crack_steghide", return_value=mock_result):
|
||||
res = runner.invoke(cli, ["steg", "crack-steghide", str(mock_file), "-w", str(wordlist_file)])
|
||||
assert res.exit_code == 0
|
||||
assert "Cracking failed: Password not found in wordlist" in res.output
|
||||
|
||||
Reference in New Issue
Block a user