When both external providerRE and BASE return nothing we parse the text ourselves.
(self)
| 622 | assert t["authors"] == ["Smith, J."] |
| 623 | |
| 624 | def test_manual_fallback(self): |
| 625 | """When both external providerRE and BASE return nothing we parse the text ourselves.""" |
| 626 | ident = IdentifierModule() |
| 627 | with patch.object(ident, "_search_openaire_for_thesis", return_value=None), \ |
| 628 | patch.object(ident, "_search_base_for_thesis", return_value=None): |
| 629 | t = ident._detect_thesis( |
| 630 | "Doe, J. (2020). Great Thesis. PhD thesis. Test University.") |
| 631 | |
| 632 | assert t["source"] == "manual" |
| 633 | assert t["is_thesis"] is True |
| 634 | assert t["thesis_type"] == "phdthesis" |
| 635 | |
| 636 | |
| 637 | # =================================================================== |
nothing calls this directly
no test coverage detected