Skip to content

Commit c68f5c9

Browse files
committed
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
1 parent 8cd8228 commit c68f5c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backend/tests/unit/test_modules/test_atheris_fuzzer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class TestAtherisFuzzerFindingGeneration:
159159

160160
async def test_create_crash_finding(self, atheris_fuzzer):
161161
"""Test crash finding creation"""
162-
from models.finding_schema import FoundBy
162+
from modules.base import FoundBy
163163

164164
finding = atheris_fuzzer.create_finding(
165165
rule_id="atheris-crash",

backend/tests/unit/test_modules/test_cargo_fuzzer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class TestCargoFuzzerFindingGeneration:
161161

162162
async def test_create_finding_from_crash(self, cargo_fuzzer):
163163
"""Test finding creation"""
164-
from models.finding_schema import FoundBy
164+
from modules.base import FoundBy
165165

166166
finding = cargo_fuzzer.create_finding(
167167
rule_id="cargo-fuzz-crash",

0 commit comments

Comments
 (0)