test_07_RecordInst.py 778 Bytes
Newer Older
LE GAC Renaud's avatar
LE GAC Renaud committed
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 30 31 32 33 34 35 36
# -*- coding: utf-8 -*-
"""test_06_RecordThesis

Test specific methods of the RecordInst class for CPPM

"""
import pytest
from invenio_tools import load_record


@pytest.fixture(scope="module")
def record():
    return load_record("inspirehep.net", 902989)


def test_future_identifer(record):
    assert record.future_identifier() == u'CPPM, Marseille'


def test_id(record):
    assert record.id() == 902989


def test_identifier(record):
    assert record.identifier() == u'Marseille, CPPM'


def test_name(record):
    assert record.name() == \
        u'Centre de Physique des Particules de Marseille (CPPM)'


def test_rex(record):
    assert record.rex() == \
        r"Marseille, CPPM|CPPM, Marseille|" \
        "Centre de Physique des Particules de Marseille (CPPM)"