MCPcopy Create free account
hub / github.com/HzaCode/OneCite / fake_get

Method fake_get

tests/test_pipeline_unit.py:348–356  ·  view source on GitHub ↗
(url, *a, **kw)

Source from the content-addressed store, hash-verified

346 ident = IdentifierModule()
347
348 def fake_get(url, *a, **kw):
349 return DummyResponse(json_data={"message": {"items": [
350 {"title": ["Deep Learning"], "DOI": "10.1000/abc",
351 "author": [{"given": "Ian", "family": "Goodfellow"}],
352 "container-title": ["Nature"],
353 "published-print": {"date-parts": [[2016]]},
354 "is-referenced-by-count": 10},
355 {"title": ["Other"], "DOI": "10.1000/def"},
356 ]}})
357
358 with patch("onecite.pipeline.requests.get", side_effect=fake_get):
359 r = ident._resolve_doi_via_crossref_title("Deep Learning", "Deep Learning 2016")

Callers

nothing calls this directly

Calls 1

DummyResponseClass · 0.85

Tested by

no test coverage detected