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( > 0).iterselect()
reg_institute = \
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 -*-
* collection of proceeding with issues
import pytest
from gluon import current
from harvest_tools.checkandfix import CheckAndFix
from invenio_tools import load_record
def svc():
return CheckAndFix()
def test_acti_ins1519593(svc):
* IPN author not found with release
The Correct affiliation is defined but in second position.
recins = load_record("", 1519593)
pattern = "Orsay, IPN|IPNO, Orsay" = 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