test_com_cds1550918.py 3.11 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# -*- coding: utf-8 -*-
"""TALK

    http://cds.cern.ch/record/1550918

    LHCb Upgrade
    R. Le Gac, Flavor Physics & CP Violation ,
    Buzios, Rio, Brazil, 19 - 24 May 2013

No corrections are applied to the record.
Allow to test the brute force decoding with its mistakes.

Note:
    * Only first author defined
"""
import pytest


19
from invenio_tools import load_record, RecordConf
20 21 22 23


@pytest.fixture(scope="module")
def record():
24
    return load_record('cds.cern.ch', 1550918)
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90


def test_authors(record):
    assert record.authors() == ""


def test_collaboration(record):
    assert record.collaboration() == ""


def test_conference_dates(record):
    assert record.conference_dates() == "19 - 24 May 2013"


def test_conference_country(record):
    assert record.conference_country() == "Brazil"


def test_conference_key(record):
    assert record.conference_key() == "buzios20130519"


def test_conference_location(record):
    assert record.conference_location() == "Buzios, Rio, Brazil"


def test_conference_title(record):
    assert record.conference_title() == "Flavor Physics & CP Violation"


def test_conference_town(record):
    assert record.conference_town() == "Buzios"


def test_conference_url(record):
    assert record.conference_url() == ""


def test_conference_year(record):
    assert record.conference_year() == "2013"


def test_first_author(record):
    assert record.first_author() == "Le Gac, R"


def test_first_institutes(record):
    assert record.first_author_institutes() == u"CPPM, Aix-Marseille Université, CNRS/IN2P3, Marseille, France"


def test_host(record):
    assert record.host() == "cds.cern.ch"


def test_id(record):
    assert record.id() == "1550918"


def test_institutes(record):
    institutes = record.institutes()

    assert record.institutes() == []
    assert record.is_institute_defined() == False


def test_is_proceeding(record):
91
    assert isinstance(record, RecordConf)
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
    assert record.is_published() == False


def test_oai(record):
    assert record.oai() == "oai:cds.cern.ch:1550918"
    assert record.oai_url() == "http://cds.cern.ch/record/1550918"


def test_paper_reference(record):
    assert record.paper_editor() == ""
    assert record.paper_pages() == ""
    assert record.paper_volume() == ""
    assert record.paper_year() == ""


def test_paper_url(record):
    assert record.paper_url() == ""


def test_preprint_number(record):
    assert record.preprint_number() == ""


def test_submitted(record):
    assert record.submitted() == ["2013-05-24"]


def test_reference_conference_id(record):
    assert record.reference_conference_id() == "1545572"


def test_reference_conference_key(record):
    assert record.reference_conference_key() == "buzios20130519"


def test_reference_conference_proceeding(record):
    assert record.reference_conference_proceeding() == ""


def test_reference_conference_talk(record):
    assert record.reference_conference_talk() == ""


def test_report_number(record):
    assert record.report_number() == "LHCb-TALK-2013-160"


def test_title(record):
    assert record.title() == "The LHCb Upgrade"


def test_year(record):
    assert record.year() == "2013"