diff options
author | Tobias Brox <tobias@redpill-linpro.com> | 2022-01-07 22:22:41 +0100 |
---|---|---|
committer | Tobias Brox <tobias@redpill-linpro.com> | 2022-01-07 22:22:41 +0100 |
commit | f1c234e86f4c866b10b00e7440084cc542838414 (patch) | |
tree | 35ea4effbbf6732bf35798cc9177612fef62a001 | |
parent | b40dacb334ef5de236cf1048fddba2a5cf4df5be (diff) | |
download | python-caldav-f1c234e86f4c866b10b00e7440084cc542838414.zip |
new test for to_wire
-rw-r--r-- | tests/test_utils.py | 13 |
1 files changed, 13 insertions, 0 deletions
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) + |