def testPrettyPrint(self):
		method_name = sys._getframe(0).f_code.co_name
		print "**** %s ****" % method_name
		for key, filename in self.data.iteritems():
			print "%s: %s " %  (key, filename)
			print "-" * len(filename)
			extool = ExifTool(filename, False)
			extool.prettyPrint()
	def test_GetAttributes(self):
		method_name = sys._getframe(0).f_code.co_name
		print "**** %s ****" % method_name		
		#fn =r"/Users/luiscberrocal/Pictures/IMG_3109.JPG"
		extool = ExifTool(self.fn, False)
		make = extool.getAttribute("exif:Make")
		self.assertEquals(make, "Canon")
		flash = extool.getAttribute("Flash", "exif")
		self.assertEquals(flash,"Off, Did not fire")
	def test_WriteToXMP_JPG(self):
		method_name = sys._getframe(0).f_code.co_name
		print "**** %s ****" % method_name
		fn = self.data['ferns']
		backup_folder = TestConfig.getInstance().output_path
		backup_file = backupFile(fn, outputPath=backup_folder, overwrite=True)
		print backup_file
		ex = ExifTool(backup_file, False)
		now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
		ex.setAttributes("exif", {"DateTimeOriginal": now})
		dates = ex.getDateAttributes()
		for k, v in dates.iteritems():
			print "%40s = %s" % (k, v)
	def testSetAttributes(self):
		method_name = sys._getframe(0).f_code.co_name
		print "**** %s ****" % method_name		
		#fn =r"/Users/luiscberrocal/Pictures/IMG_3109.JPG"
		nfn = backupFile(self.fn)
		extool = ExifTool(nfn, False)
		title = u"XMP Title set on %s" % (datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
		print nfn
		print "-" * len(nfn)
		extool.setAttributes("xmp",{"Title": title})
		extool.prettyPrint("xmp")
		#print extool.getAttribute("xmp:Title")
		self.assertEquals(title, extool.getAttribute("xmp:Title"))
	def test_checkForDates(self):
		method_name = sys._getframe(0).f_code.co_name
		print "**** %s ****" % method_name
		fn  = self.data['ppt_pdf']
		extool = ExifTool(fn, True)
		print extool.filename
		print "=" * len(extool.filename)
		dates = extool.getDateAttributes()
		for k, v in dates.iteritems():
			print "%40s = %s" % (k, v)
		
		extool = ExifTool(self.fn, False)
		print extool.filename
		print "=" * len(extool.filename)
		dates = extool.getDateAttributes()
		for k, v in dates.iteritems():
			print "%40s = %s" % (k, v)
		fn = self.data['ferns']
		extool = ExifTool(fn, False)
		print extool.filename
		print "=" * len(extool.filename)
		dates = extool.getDateAttributes()
		for k, v in dates.iteritems():
			print "%40s = %s" % (k, v)