예제 #1
0
 def test_field2bytes_with_text(self):
     from ZPublisher.Converters import field2bytes
     to_convert = u'to_convert'
     expected = b'to_convert'
     self.assertEqual(field2bytes(to_convert), expected)
예제 #2
0
 def test_field2bytes_with_text(self):
     from ZPublisher.Converters import field2bytes
     to_convert = u'to_convert'
     expected = b'to_convert'
     self.assertEqual(field2bytes(to_convert), expected)
예제 #3
0
 def test_field2bytes_with_bytes(self):
     from ZPublisher.Converters import field2bytes
     to_convert = b'to_convert'
     self.assertEqual(field2bytes(to_convert), to_convert)
예제 #4
0
 def test_field2bytes_with_bytes(self):
     from ZPublisher.Converters import field2bytes
     to_convert = b'to_convert'
     self.assertEqual(field2bytes(to_convert), to_convert)