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

Commit 0d3f1bb3 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Bug fix: affiliation in second position not found (ins1519593).

parent 43a528ee
......@@ -117,7 +117,7 @@ class CheckAndFix(object):
iterselect = db(db.affiliation_keys.id > 0).iterselect()
reg_institute = \
u"|".join(imap(
lambda row: u"^%(key_u)s%(key_v)s" % row, iterselect))
lambda row: u"%(key_u)s%(key_v)s" % row, iterselect))
# protect special character
reg_institute = (reg_institute
......
......@@ -66,9 +66,9 @@ def test_find_authors_by_affiliation(recordfix):
rex = svc._get_reg_institute()
references = set([
"^CPPM, Marseille",
"^Centre de Physique des Particules de Marseille \\(CPPM\\)",
"^Marseille, CPPM"])
"CPPM, Marseille",
"Centre de Physique des Particules de Marseille \\(CPPM\\)",
"Marseille, CPPM"])
values = set(rex.split("|"))
assert values == references
......
# -*- coding: utf-8 -*-
"""test_acti
* collection of proceeding with issues
"""
import pytest
from gluon import current
from harvest_tools.checkandfix import CheckAndFix
from invenio_tools import load_record
@pytest.fixture(scope="module")
def svc():
return CheckAndFix()
def test_acti_ins1519593(svc):
"""
XML:
* IPN author not found with release 0.9.6.5.
The Correct affiliation is defined but in second position.
"""
recins = load_record("inspirehep.net", 1519593)
pattern = "Orsay, IPN|IPNO, Orsay"
current.app.reg_institute = pattern
assert recins.find_authors_by_affiliation(pattern) == "Scozzi, Federico"
\ No newline at end of file
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