Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
limbra
limbra
Commits
80e9a83c
Commit
80e9a83c
authored
Jan 18, 2016
by
LE GAC Renaud
Browse files
Add a test to verify the method Checkandfix.recovery_oai.
parent
22b36f41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
tests/harvest_tools/CheckAndFix/test_recovery_mechanism.py
tests/harvest_tools/CheckAndFix/test_recovery_mechanism.py
+16
-0
No files found.
tests/harvest_tools/CheckAndFix/test_recovery_mechanism.py
View file @
80e9a83c
...
...
@@ -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"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment