aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-10-22 19:25:24 -0700
committerBryan Newbold <bnewbold@archive.org>2021-10-22 19:25:24 -0700
commit09668907c81492774986e11f0acd9b06090dfbe0 (patch)
treebbe8ebc3200ce3019aaf2620dbed55d69448fa19 /tests
parent331288cd15d471b2ae362bf6c990f627686067d8 (diff)
downloadgrobid_tei_xml-09668907c81492774986e11f0acd9b06090dfbe0.tar.gz
grobid_tei_xml-09668907c81492774986e11f0acd9b06090dfbe0.zip
refactor GrobidHeader and GrobidCitation into GrobidBiblio
Diffstat (limited to 'tests')
-rw-r--r--tests/test_csl.py1
-rw-r--r--tests/test_parse.py12
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/test_csl.py b/tests/test_csl.py
index 9c8bd5f..c017488 100644
--- a/tests/test_csl.py
+++ b/tests/test_csl.py
@@ -24,6 +24,7 @@ def test_small_xml_csl() -> None:
"issued": [[2000]],
}
+ assert d.citations
assert d.citations[0].to_csl_dict() == {
"type": "article-journal",
"title": "Everything is Wonderful",
diff --git a/tests/test_parse.py b/tests/test_parse.py
index 7749201..25ffa64 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -5,8 +5,7 @@ import xml.etree.ElementTree
import pytest
-from grobid_tei_xml import (GrobidCitation, GrobidDocument, parse_citations_xml,
- parse_document_xml)
+from grobid_tei_xml import GrobidBiblio, GrobidDocument, parse_citations_xml, parse_document_xml
from grobid_tei_xml.types import *
@@ -21,7 +20,7 @@ def test_small_xml() -> None:
grobid_version='0.5.1-SNAPSHOT',
grobid_timestamp='2018-04-02T00:31+0000',
language_code='en',
- header=GrobidHeader(
+ header=GrobidBiblio(
title="Dummy Example File",
authors=[
GrobidAuthor(full_name="Brewster Kahle",
@@ -43,14 +42,13 @@ def test_small_xml() -> None:
surname="Doe",
),
],
- journal=GrobidJournal(
- name="Dummy Example File. Journal of Fake News. pp. 1-2. ISSN 1234-5678", ),
+ journal="Dummy Example File. Journal of Fake News. pp. 1-2. ISSN 1234-5678",
date="2000",
),
abstract="Everything you ever wanted to know about nothing",
body=expected_body,
citations=[
- GrobidCitation(
+ GrobidBiblio(
index=0,
id="b0",
authors=[
@@ -62,7 +60,7 @@ def test_small_xml() -> None:
volume="20",
pages="1-11",
),
- GrobidCitation(
+ GrobidBiblio(
index=1,
id="b1",
authors=[],