summaryrefslogtreecommitdiffstats
path: root/tests/test_parse.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_parse.py')
-rw-r--r--tests/test_parse.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py
index 825b561..7749201 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -24,7 +24,7 @@ def test_small_xml() -> None:
header=GrobidHeader(
title="Dummy Example File",
authors=[
- GrobidAuthor(name="Brewster Kahle",
+ GrobidAuthor(full_name="Brewster Kahle",
given_name="Brewster",
surname="Kahle",
affiliation=GrobidAffiliation(
@@ -38,7 +38,7 @@ def test_small_xml() -> None:
),
)),
GrobidAuthor(
- name="J Doe",
+ full_name="J Doe",
given_name="J",
surname="Doe",
),
@@ -53,7 +53,9 @@ def test_small_xml() -> None:
GrobidCitation(
index=0,
id="b0",
- authors=[GrobidAuthor(name="A Seaperson", given_name="A", surname="Seaperson")],
+ authors=[
+ GrobidAuthor(full_name="A Seaperson", given_name="A", surname="Seaperson")
+ ],
date="2001",
journal="Letters in the Alphabet",
title="Everything is Wonderful",
@@ -127,7 +129,7 @@ def test_example_grobid_tei_xml() -> None:
"""Changes of patients' satisfaction with the health care services in Lithuanian Health Promoting Hospitals network"""
ref = [c for c in doc.citations or [] if c.id == "b12"][0]
- assert ref.authors[0].name == "K Tasa"
+ assert ref.authors[0].full_name == "K Tasa"
assert ref.authors[0].given_name == "K"
assert ref.authors[0].surname == "Tasa"
assert ref.journal == "Quality Management in Health Care"
@@ -193,7 +195,7 @@ def test_single_citations_xml() -> None:
assert d.title == """Mesh migration following abdominal hernia repair: a comprehensive review"""
assert d.authors[2].given_name == "L"
assert d.authors[2].surname == "Taveras"
- assert d.authors[2].name == "L R Taveras"
+ assert d.authors[2].full_name == "L R Taveras"
assert d.doi == "10.1007/s10029-019-01898-9"
assert d.pmid == "30701369"
assert d.date == "2019-01-30"