[GEMINI] Refactor test suite structure for new helpers and config modules

This commit is contained in:
venus
2026-07-19 00:53:00 -05:00
parent 8b82058cc6
commit 4bddd4a49b
6 changed files with 59 additions and 39 deletions

View File

@@ -4,7 +4,8 @@ import os
import stat
import sys
from click.testing import CliRunner
from ctf.utils import load_config, active_categories
from ctf.config import load_config
from ctf.utils import active_categories
from ctf.forensics import get_metadata
from ctf.cli_forensics import forensics_group, metadata
@@ -46,19 +47,6 @@ TEST_ENV = Path("tests/env")
# where POSIX ownership resolution or xattr is not native.
# =====================================================================
def test_load_config_static():
"""Verifies load_config using the persistent test file."""
config_file = TEST_ENV / "config.toml"
test_data = {
"Competition": {"name": "PersistentComp"},
"Enviroment": {"data_dir": str(TEST_ENV.absolute())}
}
config_file.parent.mkdir(parents=True, exist_ok=True)
with open(config_file, "w") as f:
toml.dump(test_data, f)
loaded_data = load_config(str(config_file))
assert loaded_data["Competition"]["name"] == "PersistentComp"
def test_active_categories_static():
"""Verifies active_categories using the pre-created 'comp1' folder."""