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
234885d5
Commit
234885d5
authored
Jan 27, 2020
by
LE GAC Renaud
Browse files
Update test_01_InvenioStore.
parent
615689e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
tests/basis/test_01_InvenioStore.py
tests/basis/test_01_InvenioStore.py
+23
-1
No files found.
tests/basis/test_01_InvenioStore.py
View file @
234885d5
...
...
@@ -6,7 +6,7 @@ Test methods of the class InveniStore
from
invenio_tools.inveniostore
import
InvenioStore
def
test_get_ids
():
def
test_get_ids
_cds
():
"""Check the list of record ids for LHCb articles published in 2015.
"""
...
...
@@ -36,3 +36,25 @@ def test_get_ids():
assert
len
(
rec_ids
)
==
59
assert
rec_ids
==
ref_2019_ids
def
test_get_ids_ins
():
"""Check the list of record ids for LHCb articles published in 2010.
"""
store
=
InvenioStore
(
"inspirehep.net"
)
query
=
"find cn lhcb and tc p and not tc c and date 2010"
kwargs
=
{
"p"
:
query
,
# query à la spires
"rg"
:
1000
,
# maximum number of records returned
"sf"
:
"year"
,
# sort by date
"so"
:
"d"
}
# descending order
rec_ids
=
store
.
get_ids
(
**
kwargs
)
rec_ids
.
sort
()
ref_2019_ids
=
[
865584
,
867355
,
867647
]
assert
len
(
rec_ids
)
==
3
assert
rec_ids
==
ref_2019_ids
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