예제 #1
0
 def testCorrectValueUpper(self):
     p = LogLevelParameter()
     d = {}
     c = {'logging': 'DEBUG'}
     self.assertTrue(p.fromFile(c, d))
     self.assertEqual(d['logLevel'], logging.DEBUG)
예제 #2
0
 def testCorrectValueLower(self):
     p = LogLevelParameter()
     d = {}
     c = {'logging': 'quiet'}
     self.assertTrue(p.fromFile(c, d))
     self.assertEqual(d['logLevel'], logging.WARNING)
예제 #3
0
 def testWrongValuefromFile(self):
     p = LogLevelParameter()
     d = {}
     c = {'logging': 'foo'}
     self.assertFalse(p.fromFile(c, d))