示例#1
0
 def test_strip_null_bytes(self):
     """
     Check that null bytes are stripped from the string.
     """
     key = "not relevant"
     value = "abc\x00d"
     self.assertEqual(sanitize_exif_value(key, value), "abcd")
示例#2
0
 def test_strip_null_bytes(self):
     """
     Check that null bytes are stripped from the string.
     """
     key = "not relevant"
     value = "abc\x00d"
     self.assertEqual(sanitize_exif_value(key, value), "abcd")
示例#3
0
 def test_coerce_to_text(self):
     """
     Check that non-text types are coerced to text.
     """
     key = "not relevant"
     value = (20, 70)
     self.assertEqual(sanitize_exif_value(key, value), "(20, 70)")
示例#4
0
 def test_coerce_to_text(self):
     """
     Check that non-text types are coerced to text.
     """
     key = "not relevant"
     value = (20, 70)
     self.assertEqual(sanitize_exif_value(key, value), "(20, 70)")