diff --git a/tests/dicts/parse/test_parse_util.py b/tests/dicts/parse/test_parse_util.py new file mode 100644 index 0000000..9e80652 --- /dev/null +++ b/tests/dicts/parse/test_parse_util.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- + +from benedict.dicts.parse import parse_util + +import unittest + + +class parse_util_test_case(unittest.TestCase): + + def test_parse_bool(self): + f = parse_util.parse_bool + self.assertTrue(f(1)) + self.assertTrue(f(True)) + self.assertTrue(f('1')) + self.assertTrue(f('True')) + self.assertTrue(f('Yes')) + self.assertTrue(f('Ok')) + self.assertTrue(f('On')) + self.assertFalse(f(None)) + self.assertFalse(f(0)) + self.assertFalse(f(False)) + self.assertFalse(f('0')) + self.assertFalse(f('False')) + self.assertFalse(f('No')) + self.assertFalse(f('Ko')) + self.assertFalse(f('Off')) + + def test_parse_datetime(self): + # TODO + pass + + def test_parse_decimal(self): + # TODO + pass + + def test_parse_dict(self): + # TODO + pass + + def test_parse_float(self): + # TODO + pass + + def test_parse_email(self): + # TODO + pass + + def test_parse_int(self): + # TODO + pass + + def test_parse_list(self): + # TODO + pass + + def test_parse_phonenumber(self): + # TODO + pass + + def test_parse_slug(self): + # TODO + pass + + def test_parse_str(self): + # TODO + pass