Commit 80e9a83c authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Add a test to verify the method Checkandfix.recovery_oai.

parent 22b36f41
......@@ -24,3 +24,19 @@ def test_clean_erratum():
assert isinstance(record["773"], dict)
assert record.paper_year() == "2014"
assert record.year() == "2014"
def test_recovery_oai():
record = load_record('cds.cern.ch', 1744757)
assert record.host() == ""
assert record.primary_oai_url() == "http:///record/1744757"
svc = CheckAndFix()
svc.recover_oai(record, "cds.cern.ch")
assert record.primary_oai() == "oai:cds.cern.ch:1744757"
assert record.host() == "cds.cern.ch"
assert record.oai_url() == "http://cds.cern.ch/record/1744757, http://inspirehep.net/record/1415326"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment