Spaces:
Running
Running
Commit
·
2457ae0
1
Parent(s):
cace02f
feat(phase2): add sample_evidence fixture to conftest.py
Browse filesNow that models.py exists (Phase 2 complete), enable the
sample_evidence fixture for use in Phase 3 judge tests.
- tests/conftest.py +29 -6
tests/conftest.py
CHANGED
|
@@ -4,6 +4,8 @@ from unittest.mock import AsyncMock
|
|
| 4 |
|
| 5 |
import pytest
|
| 6 |
|
|
|
|
|
|
|
| 7 |
|
| 8 |
@pytest.fixture
|
| 9 |
def mock_httpx_client(mocker):
|
|
@@ -24,9 +26,30 @@ def mock_llm_response():
|
|
| 24 |
return _mock
|
| 25 |
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
import pytest
|
| 6 |
|
| 7 |
+
from src.utils.models import Citation, Evidence
|
| 8 |
+
|
| 9 |
|
| 10 |
@pytest.fixture
|
| 11 |
def mock_httpx_client(mocker):
|
|
|
|
| 26 |
return _mock
|
| 27 |
|
| 28 |
|
| 29 |
+
@pytest.fixture
|
| 30 |
+
def sample_evidence():
|
| 31 |
+
"""Sample Evidence objects for testing."""
|
| 32 |
+
return [
|
| 33 |
+
Evidence(
|
| 34 |
+
content="Metformin shows neuroprotective properties in Alzheimer's models...",
|
| 35 |
+
citation=Citation(
|
| 36 |
+
source="pubmed",
|
| 37 |
+
title="Metformin and Alzheimer's Disease: A Systematic Review",
|
| 38 |
+
url="https://pubmed.ncbi.nlm.nih.gov/12345678/",
|
| 39 |
+
date="2024-01-15",
|
| 40 |
+
authors=["Smith J", "Johnson M"],
|
| 41 |
+
),
|
| 42 |
+
relevance=0.85,
|
| 43 |
+
),
|
| 44 |
+
Evidence(
|
| 45 |
+
content="Drug repurposing offers faster path to treatment...",
|
| 46 |
+
citation=Citation(
|
| 47 |
+
source="web",
|
| 48 |
+
title="Drug Repurposing Strategies",
|
| 49 |
+
url="https://example.com/drug-repurposing",
|
| 50 |
+
date="Unknown",
|
| 51 |
+
authors=[],
|
| 52 |
+
),
|
| 53 |
+
relevance=0.72,
|
| 54 |
+
),
|
| 55 |
+
]
|