From 3c7fedbb13af33412e23ec49a4c68456d00e2231 Mon Sep 17 00:00:00 2001 From: venus Date: Sun, 19 Jul 2026 03:39:15 -0500 Subject: [PATCH] [GEMINI] Update test imports and mock paths to point to ctf.cli package --- tests/test_commands.py | 4 +--- tests/test_forensics.py | 2 +- tests/test_steg.py | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/test_commands.py b/tests/test_commands.py index 06e2590..6f7ba88 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -1,7 +1,5 @@ -# tests/test_commands.py -from pathlib import Path from click.testing import CliRunner -from ctf.commands import basic_group +from ctf.cli.basic import basic_group from ctf.config import Config # {{{ test_basic_test_cli diff --git a/tests/test_forensics.py b/tests/test_forensics.py index e59cbfe..bdbb4d0 100644 --- a/tests/test_forensics.py +++ b/tests/test_forensics.py @@ -6,7 +6,7 @@ import sys from click.testing import CliRunner from ctf.utils import active_categories from ctf.forensics import get_metadata -from ctf.cli_forensics import forensics_group, metadata +from ctf.cli.forensics import forensics_group, metadata # Define the persistent test environment path TEST_ENV = Path("tests/env") diff --git a/tests/test_steg.py b/tests/test_steg.py index a9796fa..b9e27a2 100644 --- a/tests/test_steg.py +++ b/tests/test_steg.py @@ -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