Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 234885d5 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update test_01_InvenioStore.

parent 615689e4
......@@ -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
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