From f1c234e86f4c866b10b00e7440084cc542838414 Mon Sep 17 00:00:00 2001 From: Tobias Brox Date: Fri, 7 Jan 2022 22:22:41 +0100 Subject: new test for to_wire --- tests/test_utils.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/test_utils.py diff --git a/tests/test_utils.py b/tests/test_utils.py new file mode 100644 index 0000000..c638030 --- /dev/null +++ b/tests/test_utils.py @@ -0,0 +1,13 @@ +from unittest import TestCase +from caldav.lib.python_utilities import to_wire + +class TestUtils(TestCase): + def test_to_wire(self): + self.assertEqual(to_wire('blatti'), b'blatti') + self.assertEqual(to_wire(b'blatti'), b'blatti') + self.assertEqual(to_wire(u'blatti'), b'blatti') + self.assertEqual(to_wire(''), b'') + self.assertEqual(to_wire(u''), b'') + self.assertEqual(to_wire(b''), b'') + self.assertEqual(to_wire(None), None) + -- cgit v1.2.3