def test_get_title_from_titles_an_empty_list(): titles_an_empty_list = InspireRecord({'titles': []}) latex = Latex(titles_an_empty_list, 'latex_eu') expected = '' result = latex._get_title() assert expected == result
def test_get_title_from_titles_an_empty_list(): titles_an_empty_list = Record({'titles': []}) latex = Latex(titles_an_empty_list, 'latex_eu') expected = '' result = latex._get_title() assert expected == result
def test_get_title_no_titles(): no_titles = InspireRecord({}) latex = Latex(no_titles, 'latex_eu') expected = '' result = latex._get_title() assert expected == result
def test_get_title_no_titles(): no_titles = Record({}) latex = Latex(no_titles, 'latex_eu') expected = '' result = latex._get_title() assert expected == result
def test_get_title_no_titles(): no_titles = {} latex = Latex(no_titles, 'latex_eu') expected = '' result = latex._get_title() assert expected == result
def test_get_title_from_titles_not_a_list(): titles_not_a_list = InspireRecord( {'titles': { 'title': 'Partial Symmetries of Weak Interactions' }}) latex = Latex(titles_not_a_list, 'latex_eu') expected = 'Partial Symmetries of Weak Interactions' result = latex._get_title() assert expected == result
def test_get_title_from_titles_a_list_with_one_element(): titles_a_list_with_one_element = InspireRecord( {'titles': [{ 'title': 'Partial Symmetries of Weak Interactions' }]}) latex = Latex(titles_a_list_with_one_element, 'latex_eu') expected = 'Partial Symmetries of Weak Interactions' result = latex._get_title() assert expected == result
def test_get_title_from_titles_not_a_list(): titles_not_a_list = Record({ 'titles': { 'title': 'Partial Symmetries of Weak Interactions' } }) latex = Latex(titles_not_a_list, 'latex_eu') expected = 'Partial Symmetries of Weak Interactions' result = latex._get_title() assert expected == result
def test_get_title_from_titles_a_list_with_one_element(): titles_a_list_with_one_element = Record({ 'titles': [ {'title': 'Partial Symmetries of Weak Interactions'} ] }) latex = Latex(titles_a_list_with_one_element, 'latex_eu') expected = 'Partial Symmetries of Weak Interactions' result = latex._get_title() assert expected == result
def test_get_title_from_titles_a_list_with_two_elements(): titles_a_list_with_two_elements = InspireRecord({ 'titles': [ {'title': 'Broken Symmetries and the Masses of Gauge Bosons'}, {'title': 'BROKEN SYMMETRIES AND THE MASSES OF GAUGE BOSONS.'} ] }) latex = Latex(titles_a_list_with_two_elements, 'latex_eu') expected = 'Broken Symmetries and the Masses of Gauge Bosons' result = latex._get_title() assert expected == result
def test_get_title_from_titles_a_list_with_two_elements(): titles_a_list_with_two_elements = Record({ 'titles': [ {'title': 'Broken Symmetries and the Masses of Gauge Bosons'}, {'title': 'BROKEN SYMMETRIES AND THE MASSES OF GAUGE BOSONS.'} ] }) latex = Latex(titles_a_list_with_two_elements, 'latex_eu') expected = 'Broken Symmetries and the Masses of Gauge Bosons' result = latex._get_title() assert expected == result