Skip to content

Commit

Permalink
856 Hathi URL 2nd indicator changed from 0 to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
klinga committed Sep 10, 2024
1 parent 59e4ffa commit 2737dcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion google_books/marc_manipulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_marc_manipulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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}"
)


Expand Down

0 comments on commit 2737dcc

Please sign in to comment.