← Về thư mục
scripts/test_crossref_client.py
- test_title_search_match_at_threshold · function · L12-L34 — def test_title_search_match_at_threshold(monkeypatch)
- test_title_search_no_match_below_threshold · function · L37-L54 — def test_title_search_no_match_below_threshold(monkeypatch)
- test_doi_lookup_with_title_cross_check · function · L57-L78 — def test_doi_lookup_with_title_cross_check(monkeypatch)
- test_doi_lookup_with_matching_title · function · L81-L103 — def test_doi_lookup_with_matching_title(monkeypatch)
- test_429_triggers_2s_backoff_3_retries · function · L106-L128 — def test_429_triggers_2s_backoff_3_retries(monkeypatch)
- mock_urlopen · function · L112-L117 — def mock_urlopen(args, *kwargs)
- test_5xx_skips_immediately · function · L131-L148 — def test_5xx_skips_immediately(monkeypatch)
- mock_urlopen · function · L137-L141 — def mock_urlopen(args, *kwargs)
- test_doi_404_treated_as_miss_not_unavailable · function · L151-L168 — def test_doi_404_treated_as_miss_not_unavailable(monkeypatch)
- mock_urlopen · function · L155-L159 — def mock_urlopen(args, *kwargs)
- test_title_search_prefers_matching_year · function · L171-L200 — def test_title_search_prefers_matching_year(monkeypatch)
- test_polite_pool_email_in_user_agent · function · L203-L225 — def test_polite_pool_email_in_user_agent(monkeypatch)
- mock_urlopen · function · L209-L217 — def mock_urlopen(req, args, *kwargs): # urllib.request.Request stores headers; access via get_header (case-insensitive)
- test_oserror_during_read_raises_unavailable · function · L231-L246 — def test_oserror_during_read_raises_unavailable(monkeypatch)
- test_invalid_utf8_body_raises_unavailable · function · L249-L262 — def test_invalid_utf8_body_raises_unavailable(monkeypatch)
- test_invalid_json_body_raises_unavailable · function · L265-L279 — def test_invalid_json_body_raises_unavailable(monkeypatch)
- test_truncated_read_raises_unavailable · function · L282-L300 — def test_truncated_read_raises_unavailable(monkeypatch)
- test_throttle_uses_monotonic_clock · function · L303-L331 — def test_throttle_uses_monotonic_clock(monkeypatch)
- fake_monotonic · function · L312-L314 — def fake_monotonic()
- fake_time · function · L316-L318 — def fake_time()
- test_doi_lookup_quotes_doi_path_segment · function · L334-L363 — def test_doi_lookup_quotes_doi_path_segment(monkeypatch)
- mock_urlopen · function · L340-L351 — def mock_urlopen(req, args, *kwargs)
- test_rejects_non_crossref_api_url_before_urlopen · function · L366-L377 — def test_rejects_non_crossref_api_url_before_urlopen(monkeypatch)
- test_refusal_message_never_carries_mailto · function · L380-L393 — def test_refusal_message_never_carries_mailto(monkeypatch)