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
e42aa50d
Commit
e42aa50d
authored
Jan 07, 2021
by
LE GAC Renaud
Browse files
Reorganise test_03_Record
parent
6fcfceaf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
14 deletions
+29
-14
tests/basis/test_03_Record.py
tests/basis/test_03_Record.py
+29
-14
No files found.
tests/basis/test_03_Record.py
View file @
e42aa50d
...
...
@@ -3,7 +3,8 @@
Test all methods of the Record class for a given article:
https://cds.cern.ch/record/1951625.
(same as https://inspirehep.net/record/1319638)
same as https://old.inspirehep.net/record/1319638
same as https://inspirehep.net/api/literature/1319638
Precision luminosity measurements at LHCb,
J. Instrum. 9 (2014) P12005
...
...
@@ -30,6 +31,11 @@ def recins():
recjson
=
store
.
get_record
(
1319638
)
return
Record
(
recjson
)
# ............................................................................
#
# from cds.cern.ch
#
def
test__get_cds_03001
(
reccds
):
assert
reccds
.
_get
(
"subject"
,
"source"
)
==
"arXiv"
...
...
@@ -45,28 +51,27 @@ def test__oai_url_cds_03002(reccds):
assert
reccds
.
_oai_url
(
oai
)
==
"http://cds.cern.ch/record/1951625"
def
test_id_cds_03003
(
reccds
):
def
test_host_cds_03003
(
reccds
):
assert
reccds
.
host
()
==
"cds.cern.ch"
def
test_id_cds_03004
(
reccds
):
assert
reccds
.
id
()
==
1951625
def
test_primary_oai_cds_0300
4
(
reccds
):
def
test_primary_oai_cds_0300
5
(
reccds
):
assert
reccds
.
primary_oai
()
==
"oai:cds.cern.ch:1951625"
def
test_
prim
ary_oai_
in
s_0300
5
(
rec
in
s
):
assert
rec
ins
.
prim
ary_oai
()
==
"oai:inspirehep.net:1319638"
def
test_
second
ary_oai_
cd
s_0300
6
(
rec
cd
s
):
assert
rec
cds
.
second
ary_oai
()
==
"oai:inspirehep.net:1319638"
def
test_oai_0300
6
(
reccds
):
def
test_oai_
cds_
0300
7
(
reccds
):
assert
reccds
.
oai
()
==
\
"oai:cds.cern.ch:1951625, oai:inspirehep.net:1319638"
def
test_oai_ins_03007
(
reccds
,
recins
):
assert
recins
.
oai
()
==
\
"oai:inspirehep.net:1319638, oai:cds.cern.ch:1951625"
def
test_primary_oai_url_cds_03008
(
reccds
):
assert
reccds
.
primary_oai_url
()
==
"http://cds.cern.ch/record/1951625"
...
...
@@ -80,10 +85,20 @@ def test_oai_url_cds_03010(reccds):
"http://cds.cern.ch/record/1951625, "
\
"http://inspirehep.net/record/1319638"
def
test_host_cds_03011
(
reccds
):
assert
reccds
.
host
()
==
"cds.cern.ch"
# ............................................................................
#
# from inspirehep.net
#
def
test_host_ins_03012
(
recins
):
assert
recins
.
host
()
==
"inspirehep.net"
def
test_primary_oai_ins_03013
(
recins
):
assert
recins
.
primary_oai
()
==
"oai:inspirehep.net:1319638"
def
test_oai_ins_03014
(
reccds
,
recins
):
assert
recins
.
oai
()
==
\
"oai:inspirehep.net:1319638, oai:cds.cern.ch: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