| 201 | ) |
| 202 | |
| 203 | self.assertEqual(fetched.uri, "https://cdn.example.test/exact.pdf") |
| 204 | self.assertEqual(fetched.fetched_at, _WHEN) |
| 205 | |
| 206 | async def test_non_pdf_and_raw_text_are_rejected_before_summary( |
| 207 | self, |
| 208 | ) -> None: |
| 209 | html = Fetched(bytes=b"<html/>", content_type="text/html") |
| 210 | with patch( |
| 211 | "quantmind.flows.paper.fetch_url", |
| 212 | new=AsyncMock(return_value=html), |
| 213 | ): |
| 214 | with self.assertRaises(UnsupportedContentTypeError): |
| 215 | await _fetch_paper_source(HttpUrl(url="https://example.test")) |
| 216 | with self.assertRaises(UnsupportedContentTypeError): |
| 217 | await _fetch_paper_source(RawText(text="no physical pages")) |
| 218 | |
| 219 | async def test_doi_requires_an_exact_pdf_resolver(self) -> None: |
nothing calls this directly
no outgoing calls
no test coverage detected