Commit 8eb3373d authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update test_01_InvenioStore

parent 28a3a4b0
......@@ -21,21 +21,19 @@ def test_get_ids_cds_01001():
"sf": "year"}
rec_ids = store.get_ids(**kwargs)
rec_ids.sort()
ref_2019_ids = [
ref_2020_ids = {
1750838, 1755550, 1951383, 1951424, 1955544, 1966993, 1967222,
1967422, 1968989, 1969197, 1970675, 1970690, 1972201, 1975522,
1975714, 1978281, 1978798, 1981106, 1983198, 1987883, 1996441,
2002385, 2003252, 2003792, 2003793, 2003794, 2004586,
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]
2055598, 2057916, 2059561, 2060452}
assert len(rec_ids) == 59
assert rec_ids == ref_2019_ids
assert set(rec_ids).difference(ref_2020_ids) == set()
def test_get_ids_ins_01002():
......@@ -46,15 +44,13 @@ def test_get_ids_ins_01002():
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
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]
ref_2019_ids = {865584, 867355, 867647}
assert len(rec_ids) == 3
assert rec_ids == ref_2019_ids
assert set(rec_ids).difference(ref_2019_ids) == set()
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