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
9bba88a5
Commit
9bba88a5
authored
Jan 07, 2021
by
LE GAC Renaud
Browse files
Update test_03_Record to add test for RecordHep
parent
f531e739
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
5 deletions
+30
-5
tests/basis/test_03_Record.py
tests/basis/test_03_Record.py
+30
-5
No files found.
tests/basis/test_03_Record.py
View file @
9bba88a5
...
...
@@ -16,6 +16,7 @@ import pytest
from
store_tools.factory
import
build_store
from
store_tools.record
import
Record
from
store_tools.recordhep
import
RecordHep
@
pytest
.
fixture
(
scope
=
"module"
)
...
...
@@ -29,7 +30,7 @@ def reccds():
def
recins
():
store
=
build_store
(
"inspirehep.net"
,
shelf
=
"literature"
)
recjson
=
store
.
get_record
(
1319638
)
return
Record
(
recjson
)
return
Record
Hep
(
recjson
)
# ............................................................................
#
...
...
@@ -91,14 +92,38 @@ def test_oai_url_cds_03010(reccds):
#
def
test_host_ins_030
1
2
(
recins
):
def
test_host_ins_0302
3
(
recins
):
assert
recins
.
host
()
==
"inspirehep.net"
def
test_primary_oai_ins_03013
(
recins
):
def
test_host_ins_03024
(
recins
):
assert
recins
.
id
()
==
1319638
def
test_primary_oai_ins_03025
(
recins
):
assert
recins
.
primary_oai
()
==
"oai:inspirehep.net:1319638"
def
test_oai_ins_03014
(
reccds
,
recins
):
def
test_secondary_oai_ins_03026
(
recins
):
assert
recins
.
secondary_oai
()
==
"oai:cds.cern.ch:1951625"
def
test_oai_ins_03027
(
recins
):
assert
recins
.
oai
()
==
\
"oai:inspirehep.net:1319638, oai:cds.cern.ch:1951625"
"oai:inspirehep.net:1319638, "
\
"oai:cds.cern.ch:1951625"
def
test_primary_oai_url_ins_03028
(
recins
):
assert
recins
.
primary_oai_url
()
==
\
"https://inspirehep.net/api/literature/1319638"
def
test_secondary_oai_url_ins_03029
(
recins
):
assert
recins
.
secondary_oai_url
()
==
"https://cds.cern.ch/record/1951625"
def
test_oai_url_ins_03030
(
recins
):
assert
recins
.
oai_url
()
==
\
"https://inspirehep.net/api/literature/1319638, "
\
"https://cds.cern.ch/record/1951625"
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