| 1 | from pathlib import Path |
| 2 | |
| 3 | import pytest |
| 4 | |
| 5 | ROOT = Path(__file__).resolve().parents[1] |
| 6 | FIXTURES = ROOT / "fixtures" |
| 7 | |
| 8 | |
| 9 | @pytest.fixture |
| 10 | def fixtures_dir(): |
| 11 | return FIXTURES |
| 12 | |
| 13 | |
| 14 | @pytest.fixture |
| 15 | def base_config(tmp_path): |
| 16 | return { |
| 17 | "min_confidence": 60, |
| 18 | "output_dir": str(tmp_path / "output"), |
| 19 | "fixtures_dir": str(FIXTURES), |
| 20 | "use_fixtures": True, |
| 21 | "feeds": { |
| 22 | "threatfox": {"enabled": True, "days": 1}, |
| 23 | "feodo": {"enabled": True}, |
| 24 | "urlhaus": {"enabled": True}, |
| 25 | "otx": {"enabled": True}, |
| 26 | "openphish": {"enabled": True}, |
| 27 | "leaks": {"enabled": False}, |
| 28 | }, |
| 29 | "rules": {"base_id": 100300}, |
| 30 | "approval": { |
| 31 | "base_url": "http://localhost:8080", |
| 32 | "token_ttl": 3600, |
| 33 | "analyst_email": "analyst@example.com", |
| 34 | "secret": "test-secret", |
| 35 | }, |
| 36 | "email": {"backend": "file", "from_addr": "cti@lab.local"}, |
| 37 | } |