# -*- coding: utf-8 -*- """PHD http://cds.cern.ch/record/1632177 Measurement of $t\bar{t}$ spin correlation and W polarization with the $t\bar{t}$ di-leptonic channel events at ATLAS L. Chen 10 Dec 2013 Corrections are applied to the record. Note: * Only the first author is defined * Record submitted is not defined * The year is not defined """ import copy import pytest from harvest_tools import CheckAndFix, family_name_fr, format_author_fr from invenio_tools import load_record @pytest.fixture(scope="module") def record(): return load_record('cds.cern.ch', 1632177) @pytest.fixture(scope="module") def recordfix(record): rec = copy.deepcopy(record) svc = CheckAndFix() svc.authors(rec) svc.format_authors(rec, format_author_fr) svc.get_my_authors(rec, family_name_fr) svc.submitted(rec) svc.year(rec) return rec def test_authors(record, recordfix): assert record.authors() == "Chen, Liming" assert recordfix.authors() == "L. Chen" def test_first_author(record, recordfix): assert record.first_author() == "Chen, Liming" assert recordfix.first_author() == "L. Chen" def test_these_defense(record, recordfix): assert record.these_defense() == "10 Dec 2013" assert recordfix.these_defense() == "10 Dec 2013" def test_these_directors(record, recordfix): assert record.these_directors() == "He, Mao, Monnier, Emmanuel, Zhu, Chengguang" assert recordfix.these_directors() == "M. He, E. Monnier, C. Zhu" def test_submitted(record, recordfix): assert record.submitted() == [] assert recordfix.submitted() == ['2013-12-10'] def test_year(record, recordfix): assert record.year() == "" assert recordfix.year() == "2013"