Example #1
0
 def test_write_exif(self):
     """ Test for write_exif() with valid image """
     exif = exiflow.exif.Exif(self.__d70jpeg)
     exif.fields = self.__fields.copy()
     self.failUnlessEqual(exif.write_exif(), 0)
     exif.read_exif()
     for field in self.__fields:
         self.failUnlessEqual(exif.fields[field], self.__fields[field])
Example #2
0
 def test_read_exif(self):
     """ Tests for read_exif() with valid image """
     exif = exiflow.exif.Exif(self.__d70jpeg)
     self.failUnless(isinstance(exif, exiflow.exif.Exif))
     exif.read_exif()
     for field in NikonD70.fields:
         self.failUnless(field in exif.fields, field + " not in fields")
         self.failUnlessEqual(exif.fields[field], NikonD70.fields[field])
Example #3
0
 def test_read_exif_imagedescription_decode(self):
     """ Tests for read_exif() with valid image """
     exif = exiflow.exif.Exif(self.__d70jpeg_imgdesc_latin1)
     self.failUnless(isinstance(exif, exiflow.exif.Exif))
     exif.read_exif()
     self.failUnlessEqual(exif.fields["ImageDescription"],
                          u"ImageDescription first row äöüß\n" +
                          u"ImageDescription second row ÄÖÜß\n")
Example #4
0
 def test_update_exif(self):
     """ Test for update_exif() with valid image """
     exif = exiflow.exif.Exif(self.__virginjpeg)
     self.failUnlessEqual(exif.update_exif(self.__d70jpeg), 0)
     exif.read_exif()
     for field in NikonD70.fields:
         self.failUnless(field in exif.fields, field + " not in fields")
         self.failUnlessEqual(exif.fields[field], NikonD70.fields[field])