Beispiel #1
0
 def test_none(self):
     """
     Test typical usage, None values
     """
     from velouria.config import coerse_boolean
     self.assertEquals(coerse_boolean(''), None)
     self.assertEquals(coerse_boolean(' '), None)
     self.assertEquals(coerse_boolean('\n     \t \n'), None)
Beispiel #2
0
 def test_false(self):
     """
     Test typical usage, False values
     """
     from velouria.config import coerse_boolean
     
     self.assertFalse(coerse_boolean('False'))
     self.assertFalse(coerse_boolean('F'))
     self.assertFalse(coerse_boolean('No'))
     self.assertFalse(coerse_boolean('N'))
     self.assertFalse(coerse_boolean('0'))
     self.assertFalse(coerse_boolean('off'))
Beispiel #3
0
 def test_true(self):
     """
     Test typical usage, True values
     """
     from velouria.config import coerse_boolean
     
     self.assertTrue(coerse_boolean('True'))
     self.assertTrue(coerse_boolean('Yes'))
     self.assertTrue(coerse_boolean('T'))
     self.assertTrue(coerse_boolean('Y'))
     self.assertTrue(coerse_boolean('100'))
     self.assertTrue(coerse_boolean('on'))