def test_set_config_option_unset_section(self): """Check set throws AttributeError as required section for settings option is not defined yet""" db = AccessionID(config=os.path.join(self.testdir, 'taxadb.cfg')) with self.assertRaises(AttributeError): db.set('newoption', 'newvalue', section="UNSET_SECCTION")
def test_set_config_option_unset_section(self): """Check set throws AttributeError as required section for settings option is not defined yet""" db = AccessionID(config=os.path.join(self.testdir, 'taxadb.cfg')) with self.assertRaises(AttributeError): db.set('newoption', 'newvalue', section="UNSET_SECCTION")
def test_get_config_returnsNone(self): """Check get method returns None when an option has no value in configuration file""" db = AccessionID(config=os.path.join(self.testdir, 'taxadb.cfg')) db.set('foobar', None) self.assertIsNone(db.get('foobar'))
def test_get_config_returnsNone(self): """Check get method returns None when an option has no value in configuration file""" db = AccessionID(config=os.path.join(self.testdir, 'taxadb.cfg')) db.set('foobar', None) self.assertIsNone(db.get('foobar'))