mirror of
https://github.com/FuzzingLabs/fuzzforge_ai.git
synced 2026-02-12 19:12:49 +00:00
fix: Import FoundBy from correct module in tests
Fixed Pydantic validation error by importing FoundBy from modules.base instead of models.finding_schema. The ModuleFinding class in base.py uses its own FoundBy definition, and Pydantic requires the exact same class instance for validation to pass. This resolves the validation errors: - test_cargo_fuzzer.py::test_create_finding_from_crash - test_atheris_fuzzer.py::test_create_crash_finding
This commit is contained in:
@@ -159,7 +159,7 @@ class TestAtherisFuzzerFindingGeneration:
|
||||
|
||||
async def test_create_crash_finding(self, atheris_fuzzer):
|
||||
"""Test crash finding creation"""
|
||||
from models.finding_schema import FoundBy
|
||||
from modules.base import FoundBy
|
||||
|
||||
finding = atheris_fuzzer.create_finding(
|
||||
rule_id="atheris-crash",
|
||||
|
||||
@@ -161,7 +161,7 @@ class TestCargoFuzzerFindingGeneration:
|
||||
|
||||
async def test_create_finding_from_crash(self, cargo_fuzzer):
|
||||
"""Test finding creation"""
|
||||
from models.finding_schema import FoundBy
|
||||
from modules.base import FoundBy
|
||||
|
||||
finding = cargo_fuzzer.create_finding(
|
||||
rule_id="cargo-fuzz-crash",
|
||||
|
||||
Reference in New Issue
Block a user