# -*- coding: utf-8 -*- """test_inveniostore """ from invenio_tools.inveniostore import InvenioStore def test_get_ids(): """Check the list of record ids for LHCb articles published in 2015. """ store = InvenioStore("cds.cern.ch") kwargs = { "f1": "year", "p1": "2015", "cc": "LHCb Papers", "m1": "r", "so": "d", "sf": "year"} rec_ids = store.get_ids(**kwargs) rec_ids.sort() ref_2015_ids = [ 1750838, 1755550, 1951383, 1951424, 1955544, 1966993, 1967222, 1967422, 1968989, 1969197, 1970675, 1970690, 1972201, 1975522, 1975714, 1978281, 1978798, 1981106, 1983198, 1987883, 1996441, 2000543, 2002385, 2003252, 2003792, 2003793, 2003794, 2004586, 2004591, 2005510, 2007377, 2011387, 2012165, 2012990, 2014715, 2014733, 2014836, 2016239, 2016711, 2019534, 2019536, 2020686, 2021262, 2029609, 2029820, 2030417, 2033887, 2033891, 2038937, 2040342, 2045144, 2047219, 2048426, 2048427, 2048812, 2049870, 2055598, 2057916, 2059561, 2060452] assert len(rec_ids) == 60 assert rec_ids == ref_2015_ids