(self)
| 113 | await resolve_doi("not-a-doi") |
| 114 | |
| 115 | async def test_404_propagates(self): |
| 116 | doi = "10.1234/example.2024.999" |
| 117 | with respx.mock(assert_all_called=True) as router: |
| 118 | router.get(f"{CROSSREF_BASE_URL}/{doi}").mock( |
| 119 | return_value=httpx.Response(404, json={"status": "no"}) |
| 120 | ) |
| 121 | with self.assertRaises(httpx.HTTPStatusError): |
| 122 | await resolve_doi(doi) |
| 123 | |
| 124 | async def test_invalid_date_returns_none(self): |
| 125 | doi = "10.1234/example.2024.001" |
nothing calls this directly
no test coverage detected