#>>> imgFile = open('/opt/zope2.7.8/Products/ATPhoto/tests/input/canoneye.jpg', 'rb')

This is a sample for a doctest file
Here you can simply write python expressions
and compare the output results like this:

>>> i=1
>>> print i
1

Lets import the necessary modules
>>> from Products.ATPhoto import config


every line that starts with '>>>' will be interpreted
as python statement.
By writing the expected output after the python
prompt lines you can compare that with the result
from the above python statements. If the outputs
differ you the test fails.



Now you can continue with the further tests of your classes here

We create the image
>>> imgFile = self.createImageFd()

Let's see if we have the right image.
>>> data = imgFile.read()
>>> len(data)
3861

Instantiate new atct object
>>> atct = self._createType(self.folder, 'Image', 'ATCT')

Set the image file into atct from a file descriptor
>>> atct.setImage(imgFile)
>>> atct.get_size()
3861

Set the image file into atct from data contained in the file
>>> atct.setImage(data)
>>> atct.get_size()
3861

>>> exifDict = atct.getEXIF()
>>> exifDict['EXIF FileSource']
'Digital Camera'

>>> atphoto = getattr(self.folder, self.folder.invokeFactory(type_name="ATPhoto", id="atphoto"))
>>> atphoto.setImage(imgFile)
>>> exifDict = atphoto.getEXIF()
>>> exifDict['EXIF FileSource']
'Digital Camera'

