def test_get_level_id(self): for name, level in ( ('NOTSET', logger.NOTSET), ('DEBUG', logger.DEBUG), ('INFO', logger.INFO), ('WARNING', logger.WARNING), ('ERROR', logger.ERROR), ('CRITICAL', logger.CRITICAL), ): self.assertEqual(logger.get_level_id(level), name)
def test_get_level_id(self): for name , level in ( ('NOTSET', logger.NOTSET), ('DEBUG', logger.DEBUG), ('INFO', logger.INFO), ('WARNING', logger.WARNING), ('ERROR', logger.ERROR), ('CRITICAL', logger.CRITICAL), ): self.assertEqual(logger.get_level_id(level), name)
def pythonize(self, val): return logger.get_level_id(val)
def pythonize(self, val): val = unique_value(val) return logger.get_level_id(val)