Esempio n. 1
0
 def test_not_safe_bool(self):
     self.assertFalse(StringCleaner.safe_bool(False))
     self.assertFalse(StringCleaner.safe_bool('False'))
     self.assertFalse(StringCleaner.safe_bool('0'))
     self.assertFalse(StringCleaner.safe_bool(None))
Esempio n. 2
0
 def test_safe_bool(self):
     self.assertTrue(StringCleaner.safe_bool('1'))
     self.assertTrue(StringCleaner.safe_bool('True'))
     self.assertTrue(StringCleaner.safe_bool(True))
     self.assertTrue(StringCleaner.safe_bool('on'))