blob: c638030fab510aa87812ef8e339292c556f2bcd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
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)
|