def test_parse_reference(self): lines = ''' REFERENCE 1 (bases 1 to 154478) AUTHORS Sato,S., Nakamura,Y., Kaneko,T., and Tabata,S. TITLE Complete structure of the chloroplast genome of Arabidopsis thaliana JOURNAL DNA Res. 6 (5), 283-290 (1999) PUBMED 10574454'''.split('\n') exp = {'AUTHORS': 'Sato,S., Nakamura,Y., Kaneko,T., and Tabata,S.', 'JOURNAL': 'DNA Res. 6 (5), 283-290 (1999)', 'PUBMED': '10574454', 'REFERENCE': '1 (bases 1 to 154478)', 'TITLE': ('Complete structure of the chloroplast genome of' ' Arabidopsis thaliana')} self.assertEqual(_parse_reference(lines), exp)
def test_parse_reference(self): lines = """ REFERENCE 1 (bases 1 to 154478) AUTHORS Sato,S., Nakamura,Y., Kaneko,T., and Tabata,S. TITLE Complete structure of the chloroplast genome of Arabidopsis thaliana JOURNAL DNA Res. 6 (5), 283-290 (1999) PUBMED 10574454""".split( "\n" ) exp = { "AUTHORS": "Sato,S., Nakamura,Y., Kaneko,T., and Tabata,S.", "JOURNAL": "DNA Res. 6 (5), 283-290 (1999)", "PUBMED": "10574454", "REFERENCE": "1 (bases 1 to 154478)", "TITLE": ("Complete structure of the chloroplast genome of" " Arabidopsis thaliana"), } self.assertEqual(_parse_reference(lines), exp)