コード例 #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
ファイル: test_utils.py プロジェクト: QLGu/django-pgallery
 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
ファイル: test_utils.py プロジェクト: QLGu/django-pgallery
 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)")