Exemple #1
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.folder.manage_addFolder('subfolder')
     self.subfolder = self.folder['subfolder']
     self.setPermissions(copymove_perms)
     self.addExtFile(id='image.gif', file=gifImage)
     transaction.savepoint(1) # need a _p_jar
Exemple #2
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.folder.manage_addFolder('subfolder')
     self.subfolder = self.folder['subfolder']
     self.setPermissions(copymove_perms)
     self.addExtImage(id='image.gif', file=gifImage)
     # Add a preview image as well
     self.folder['image.gif'].manage_file_upload(file=jpegImage, is_preview=1,
                                                 create_prev=UPLOAD_RESIZE,
                                                 maxx=100, maxy=100, ratio=1)
     transaction.savepoint(1) # need a _p_jar
Exemple #3
0
    def afterSetUp(self):
        ExtFileTestCase.afterSetUp(self)

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

        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 #4
0
    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 #5
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.setPermissions(copymove_perms)
     self.folder.manage_addFolder('subfolder')
     self.subfolder = self.folder.subfolder
Exemple #6
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.addExtFile(id='file', file=notImage)
     self.file._register()
Exemple #7
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
Exemple #8
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.addExtFile(id='file', file='')
     self.addExtImage(id='image', file='')
Exemple #9
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.setPermissions(('Add ExtFiles', 'Add ExtImages'))
Exemple #10
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.addExtFile(id='file.zip', file=gifImage)
     self.addExtImage(id='image.gif', file=gifImage)
Exemple #11
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.folder.manage_addFolder('subfolder')
     self.subfolder = self.folder['subfolder']
Exemple #12
0
 def afterSetUp(self):
     ExtFileTestCase.afterSetUp(self)
     self.addExtImage(id='mountain.tif', file=tiffImage)