Commit aa95850a authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update basis/test_09_Automaton.

parent 6f30b2f3
# -*- coding: utf-8 -*-
* Test Automaton methods
......@@ -10,22 +9,24 @@ from gluon import current
from harvest_tools.automaton import Automaton
from harvest_tools.msgcollection import MsgCollection
from invenio_tools.inveniostore import InvenioStore
from plugin_dbui import get_id
def svc():
db = current.db
# article for lhcb and for the current year
return Automaton(current.db,
return Automaton(db,
get_id(db.teams, team="LHCb"),
get_id(db.projects, project="LHCb"),
get_id(db.categories, code="ACL"),,
def test__is_record_in_db(svc):
def test__is_record_in_db_09001(svc):
"""The record cds1389970 and ins939619 describe the same LHCb paper.
* the paper is loaded in the database from
......@@ -60,7 +61,7 @@ def test__is_record_in_db(svc):
assert rec_id_1 == rec_id_2
def test_process_recid(svc):
def test_process_recid_09002(svc):
"""Test the deepest method to retrieve a record.
......@@ -100,7 +101,7 @@ def test_process_recid(svc):
def test_process_collection(svc):
def test_process_collection_09003(svc):
# mimic the previous stage process_url
collection = u"LHCb Papers"
......@@ -121,12 +122,12 @@ def test_process_collection(svc):
def test_process_url_cds(svc):
def test_process_url_cds_09004(svc):
svc.dbg = True
assert svc.process_url("", u"LHCb Papers") is None
def test_process_url_ins(svc):
def test_process_url_ins_09005(svc):
svc.dbg = True
assert svc.process_url(
"", "find cn lhcb and tc p and not tc c") is None
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