コード例 #1
0
def test_get_note_not_article_not_in_proceedings():
    record = Record({})

    not_article_not_in_proceedings = Bibtex(record)
    not_article_not_in_proceedings.entry_type = 'not-article'

    assert not_article_not_in_proceedings._get_note() is None
コード例 #2
0
def test_get_note_not_article_not_in_proceedings():
    record = InspireRecord({})

    not_article_not_in_proceedings = Bibtex(record)
    not_article_not_in_proceedings.entry_type = 'not-article'

    assert not_article_not_in_proceedings._get_note() is None
コード例 #3
0
def test_get_booktitle_not_in_proceedings():
    record = Record({})

    not_in_proceedings = Bibtex(record)
    not_in_proceedings.entry_type = 'not-inproceedings'
    not_in_proceedings.original_entry = 'not-inproceedings'

    assert not_in_proceedings._get_booktitle() is None
コード例 #4
0
def test_get_booktitle_not_in_proceedings():
    record = InspireRecord({})

    not_in_proceedings = Bibtex(record)
    not_in_proceedings.entry_type = 'not-inproceedings'
    not_in_proceedings.original_entry = 'not-inproceedings'

    assert not_in_proceedings._get_booktitle() is None
コード例 #5
0
def test_get_booktitle_from_generate_booktitle(g_b):
    # TODO: mock the actual generate_booktitle output.
    g_b.return_value = 'foo bar baz'

    record = Record({})

    in_proceedings = Bibtex(record)
    in_proceedings.entry_type = 'inproceedings'

    expected = '{foo bar baz}'
    result = in_proceedings._get_booktitle()

    assert expected == result
コード例 #6
0
def test_get_booktitle_from_generate_booktitle(g_b):
    # TODO: mock the actual generate_booktitle output.
    g_b.return_value = 'foo bar baz'

    record = InspireRecord({})

    in_proceedings = Bibtex(record)
    in_proceedings.entry_type = 'inproceedings'

    expected = '{foo bar baz}'
    result = in_proceedings._get_booktitle()

    assert expected == result