import os, sys
if __name__ == '__main__':
    execfile(os.path.join(sys.path[0], 'framework.py'))

from Testing import ZopeTestCase
ZopeTestCase.installProduct('Photo')

from Products.Photo.Photo import Photo

class photofolderTestCase(ZopeTestCase.ZopeTestCase):

    _setup_fixture = 0

    def afterSetUp(self):
        self.i = Photo('photo.jpg', 'TestTitle','') 
    
    def testCreation(self):
        """ Check for the correct creation of a photo """
        assert self.i, 'photo not created'

    def testAbsoluteURL(self):
        """ Check that Absolute URL returns meaningful value """
        self.fail(str(self.i.absolute_url()))

def getSuite():
    suite= unittest.makeSuite(photofolderTestCase, 'test')
    return suite

if __name__ == '__main__':
    framework(descriptions=1, verbosity=1)
else:
    import unittest
    test_suite = getSuite
