def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.folder.manage_addFolder('subfolder')
     self.folder_path = self.folder.absolute_url(1)
     self.subfolder = self.folder.subfolder
     self.subfolder_path = self.subfolder.absolute_url(1)
     self.setPermissions(copymove_perms)
Exemple #2
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.folder.manage_addFolder('subfolder')
     self.folder_path = self.folder.absolute_url(1)
     self.subfolder = self.folder.subfolder
     self.subfolder_path = self.subfolder.absolute_url(1)
     self.setPermissions(copymove_perms)
Exemple #3
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.setPermissions(copymove_perms+['Add Documents, Images, and Files'])
     factory = self.folder.manage_addProduct['ExternalMethod']
     factory.manage_addExternalMethod('toExtImage', '', 'ExtFile.toExtImage', 'toExtImage')
     factory = self.folder.manage_addProduct['OFSP']
     factory.manage_addImage('jpegImage', file=open(jpegImage, 'rb'), content_type='image/jpeg')
     self.folder_url = self.folder.absolute_url(1)
     self.basic_auth = '%s:%s' % (ZopeTestCase.user_name, ZopeTestCase.user_password)
Exemple #4
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     # Set up cache
     self.folder.cache = DummyCacheManager('cache')
     setattr(self.folder, ZCM_MANAGERS, ('cache',))
     self.cache = self.folder.cache.cache
     # Set up cached file
     self.addExtFile(id='file.exe', file=notImage)
     self.file.ZCacheable_setManagerId('cache')
     self.file_path = self.file.absolute_url(1)
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     # Set up cache
     self.folder.cache = DummyCacheManager('cache')
     setattr(self.folder, ZCM_MANAGERS, ('cache', ))
     self.cache = self.folder.cache.cache
     # Set up cached file
     self.addExtFile(id='file.exe', file=notImage)
     self.file.ZCacheable_setManagerId('cache')
     self.file_path = self.file.absolute_url(1)
    def afterSetUp(self):
        ExtFileTestCase.afterSetUp(self)
        self.setPermissions(copymove_perms)

        if not self.app.objectIds('Virtual Host Monster'):
            factory = self.app.manage_addProduct['SiteAccess']
            factory.manage_addVirtualHostMonster('VHM')

        factory = self.folder.manage_addProduct['ExternalMethod']
        factory.manage_addExternalMethod('PUT_factory', '', 'ExtFile.PUT_factory', 'PUT_factory')

        self.folder.manage_addFolder('subfolder')
        self.subfolder = self.folder.subfolder

        request = self.app.REQUEST
        request['PARENTS'] = [self.app]

        # Fake a dav PUT request
        request['BODYFILE'] = open(gifImage, 'rb')
        request.environ['CONTENT_TYPE'] = 'image/gif'
        request.environ['REQUEST_METHOD'] = 'PUT'
        request._auth = auth_info
Exemple #7
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.file = self.addExtFile(id='file', file='')
     self.image = self.addExtImage(id='image', file='')
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
Exemple #9
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
Exemple #10
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.addExtImage(id='mountain.tif', file=tiffImage)
Exemple #11
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.setPermissions(('Add ExtFiles', 'Add ExtImages'))
Exemple #12
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.folder_url = self.folder.absolute_url()
     self.addExtImage(id='image', file=gifImage)
Exemple #13
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.folder_url = self.folder.absolute_url()
     self.addExtImage(id='image', file=gifImage)
     self.image.manage_create_prev(maxx=10, maxy=10, ratio=1)
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.addExtFile(id='file', file=notImage)
     self.file._register()
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.file = self.addExtFile(id='file', file='')
     self.image = self.addExtImage(id='image', file='')
Exemple #16
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.addExtFile(id='file', file=notImage)
     self.file._register()