From 3456336d3e4324a542c16b91734a8ebd8ef99ab9 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 22 Oct 2021 18:46:16 -0700 Subject: more tweaking/refactoring progress, and some to_csl_dict() helpers --- tests/test_parse.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tests') 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" -- cgit v1.2.3