test_acti.py 685 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
# -*- 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"