Beispiel #1
0
 def test_add_one_with_optionals(self):
     """Add a common name with optionals to Common Names sheet."""
     wb = Workbook()
     ws = wb.active
     cnws = CommonNamesWorksheet(ws)
     cnws.setup()
     cn = CommonName(name='Foxglove',
                     description='Spotty.',
                     instructions='Just add water!')
     cn.index = Index(name='Perennial')
     cn.synonyms_string = 'Digitalis'
     cnws.add_one(cn)
     assert cnws.cell(2, cnws.cols['Description']).value == 'Spotty.'
     assert cnws.cell(
         2, cnws.cols['Planting Instructions']
     ).value == 'Just add water!'
     assert cnws.cell(2, cnws.cols['Synonyms']).value == 'Digitalis'