From 2737dcc398e48f9fd869c7ffbda10c28d707e2e0 Mon Sep 17 00:00:00 2001 From: Tomek Date: Tue, 10 Sep 2024 09:12:34 -0400 Subject: [PATCH] 856 Hathi URL 2nd indicator changed from 0 to 1 --- google_books/marc_manipulator.py | 2 +- tests/test_marc_manipulator.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google_books/marc_manipulator.py b/google_books/marc_manipulator.py index 117b90a..c4c3479 100644 --- a/google_books/marc_manipulator.py +++ b/google_books/marc_manipulator.py @@ -113,7 +113,7 @@ def generate_hathi_url( else: subfields.append(Subfield("z", "Full text available via HathiTrust")) - return Field(tag="856", indicators=["4", "0"], subfields=subfields) + return Field(tag="856", indicators=["4", "1"], subfields=subfields) def is_item_field(field: Field) -> bool: diff --git a/tests/test_marc_manipulator.py b/tests/test_marc_manipulator.py index 8298316..65e4ad6 100644 --- a/tests/test_marc_manipulator.py +++ b/tests/test_marc_manipulator.py @@ -28,7 +28,7 @@ def test_create_stub_hathi_records(tmp_path): assert bib_tags == ["245", "856", "907"] assert ( str(bib.get("856")) - == "=856 40$uhttp://hdl.handle.net/2027/nyp.33433010140428$zFull text available via HathiTrust" # noqa:E501 + == "=856 41$uhttp://hdl.handle.net/2027/nyp.33433010140428$zFull text available via HathiTrust" # noqa:E501 ) assert bib.get("907").get("a") == ".b122759692" @@ -160,7 +160,7 @@ def test_fix_oclc_info_success(stub_bib): def test_generate_hathi_url_success(barcode, volume, expectation): assert ( str(generate_hathi_url(barcode, volume)) - == f"=856 40$uhttp://hdl.handle.net/2027/nyp.{expectation}" + == f"=856 41$uhttp://hdl.handle.net/2027/nyp.{expectation}" )