def test_whole_block_to_taxon_object__with_synonym(self):
        s = '''\



 Matucana calvescens (Kimnach & Hutchison) Buxb.


Matucana calvescens (Kimnach & Hutchison) Buxb. = \
Matucana aurantiaca (Vaupel) Buxb.

Reference: Ritter, F., 1981: 1489; Hunt, D., 1992: 89.


'''
        result = taxonlist2json.whole_block_to_taxon_object(s)
        expect = {
            'object': 'taxon',
            'rank': 'species',
            'epithet': 'calvescens',
            'ht-rank': 'genus',
            'ht-epithet': 'Matucana',
            'author': '(Kimnach & Hutchison) Buxb.',
            'hybrid': False,
            'accepted': {
                'object': 'taxon',
                'rank': 'species',
                'epithet': 'aurantiaca',
                'ht-rank': 'genus',
                'ht-epithet': 'Matucana',
                'author': '(Vaupel) Buxb.',
                'hybrid': False,
            },
        }
        self.assertEquals(result, expect)
    def test_whole_block_to_taxon_object__with_synonym(self):
        s = '''\



 Matucana calvescens (Kimnach & Hutchison) Buxb.


Matucana calvescens (Kimnach & Hutchison) Buxb. = \
Matucana aurantiaca (Vaupel) Buxb.

Reference: Ritter, F., 1981: 1489; Hunt, D., 1992: 89.


'''
        result = taxonlist2json.whole_block_to_taxon_object(s)
        expect = {'object': 'taxon',
                  'rank': 'species',
                  'epithet': 'calvescens',
                  'ht-rank': 'genus',
                  'ht-epithet': 'Matucana',
                  'author': '(Kimnach & Hutchison) Buxb.',
                  'hybrid': False,
                  'accepted': {'object': 'taxon',
                               'rank': 'species',
                               'epithet': 'aurantiaca',
                               'ht-rank': 'genus',
                               'ht-epithet': 'Matucana',
                               'author': '(Vaupel) Buxb.',
                               'hybrid': False,
                               },
                  }
        self.assertEquals(result, expect)
    def test_whole_block_to_taxon_object__without_synonym(self):
        s = '''\



 Osmorhiza mexicana Griseb.



Osmorhiza mexicana Griseb.

'''
        result = taxonlist2json.whole_block_to_taxon_object(s)
        expect = {'object': 'taxon',
                  'rank': 'species',
                  'epithet': 'mexicana',
                  'ht-rank': 'genus',
                  'ht-epithet': 'Osmorhiza',
                  'author': 'Griseb.',
                  'hybrid': False,
                  }
        self.assertEquals(result, expect)
    def test_whole_block_to_taxon_object__without_synonym(self):
        s = '''\



 Osmorhiza mexicana Griseb.



Osmorhiza mexicana Griseb.

'''
        result = taxonlist2json.whole_block_to_taxon_object(s)
        expect = {'object': 'taxon',
                  'rank': 'species',
                  'epithet': 'mexicana',
                  'ht-rank': 'genus',
                  'ht-epithet': 'Osmorhiza',
                  'author': 'Griseb.',
                  'hybrid': False,
                  }
        self.assertEquals(result, expect)