Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/p/r/Products.ImageRepository-1.0.2/Products/ImageRepository/tests/testImageRepository.py   Products.ImageRepository(Download)
from Products.CMFPlone.utils import _createObjectByType
 
from Products.ImageRepository.tests.utils import loadImage
 
 
        self.repositorypath = '/' + self.repository.absolute_url(1)
        for image in images:
            _createObjectByType('Image', self.repository, image['id'], image=loadImage(image['file']), subject=image['keywords'])
        self.portal.manage_addProduct['PageTemplates'].manage_addPageTemplate('main_template', 'Main', templatetext)
 
    def afterSetUp(self):
        self.repository = _createObjectByType('ImageRepository', self.portal, 'repository')
        self.repository.at_post_create_script()
        for image in images:
            _createObjectByType('Image', self.repository, image['id'], image=loadImage(image['file']))