MCPcopy Create free account
hub / github.com/LLMQuant/quant-mind / test_year_only_date

Method test_year_only_date

tests/preprocess/fetch/test_doi.py:76–88  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

74 self.assertEqual(result.doi, doi)
75
76 async def test_year_only_date(self):
77 doi = "10.1234/example.2024.001"
78 with respx.mock(assert_all_called=True) as router:
79 router.get(f"{CROSSREF_BASE_URL}/{doi}").mock(
80 return_value=httpx.Response(
81 200,
82 json=_crossref_payload(issued={"date-parts": [[2024]]}),
83 )
84 )
85 result = await resolve_doi(doi)
86 assert result.published_at is not None
87 self.assertEqual(result.published_at.month, 1)
88 self.assertEqual(result.published_at.day, 1)
89
90 async def test_missing_optional_fields(self):
91 doi = "10.1234/example.2024.001"

Callers

nothing calls this directly

Calls 2

resolve_doiFunction · 0.90
_crossref_payloadFunction · 0.85

Tested by

no test coverage detected