Create sample ScanResult for testing.
()
| 27 | |
| 28 | @pytest.fixture |
| 29 | def sample_result(): |
| 30 | """Create sample ScanResult for testing.""" |
| 31 | target = Target.from_string("example.com") |
| 32 | result = ScanResult(target=target, module="test") |
| 33 | |
| 34 | finding = Finding( |
| 35 | title="Test Finding", |
| 36 | description="Test description", |
| 37 | severity=Severity.HIGH, |
| 38 | source="test", |
| 39 | ) |
| 40 | result.findings.append(finding) |
| 41 | |
| 42 | return result |
| 43 | |
| 44 | |
| 45 | class TestScanCache: |
nothing calls this directly
no test coverage detected