def _processBool(conf): for k in conf: if 'link' in conf[k]: conf[k]['link'] = Utils.toBool(conf[k]['link']) if 'error' in conf[k]: conf[k]['error'] = Utils.toBool(conf[k]['error']) return conf
def test_toBool(self): """toBool""" invals = ['True', 'true', True, 1, 'Yes', 'yes'] for v in invals: self.assertTrue(Utils.toBool(v)) invals = ['sdg', 'false', False, 'sagdfa'] for v in invals: self.assertFalse(Utils.toBool(v))