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

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_08_Automaton
* 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
@pytest.fixture(scope="module")
def svc():
db = current.db
# article for lhcb and for the current year
return Automaton(current.db,
7,
8,
return Automaton(db,
get_id(db.teams, team="LHCb"),
get_id(db.projects, project="LHCb"),
"article",
2,
get_id(db.categories, code="ACL"),
year_start=current.request.now.year,
dry_run=True,
debug=True)
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 cds.cern.ch.
......@@ -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):
del svc.store
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):
del svc.store
def test_process_url_cds(svc):
def test_process_url_cds_09004(svc):
svc.dbg = True
assert svc.process_url("cds.cern.ch", 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(
"inspirehep.net", "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