48
48
self.assertEqual(4, len(unicode_string))
49
49
byte_string = unicode_string.encode('utf-8')
50
50
self.assertEqual(6, len(byte_string))
51
self.assertRaises(UnicodeEncodeError, self.lockable.put, 'foo',
51
self.assertRaises(UnicodeEncodeError, self.lockable.put, 'foo',
52
52
StringIO(unicode_string))
53
53
self.lockable.put('foo', StringIO(byte_string))
54
54
self.assertEqual(byte_string,