Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(8)  |  Derive(0)  |  Import(2)

src/p/r/Products.Archetypes-1.10.1/Products/Archetypes/tests/test_marshaller.py   Products.Archetypes(Download)
from Products.Archetypes.tests.atsitetestcase import ATSiteTestCase
from Products.Archetypes.tests.utils import makeContent
from Products.Archetypes.tests.utils import aputrequest
from Products.Archetypes.tests.utils import PACKAGE_HOME
 
        # put requests don't have the luxury of being able to specify a
        # content type
        request = aputrequest(wordFile, 'application/msword')
        request.processInputs()
        word = self.folder.obj1
        rstFile.seek(0)
 
        request = aputrequest(rstFile, 'text/x-rst')
        # XXX PUT factory is using PARENTS to get an acquisition context
        request['PARENTS'] = (self.folder, self.portal)
        wordFile.seek(0)
 
        request = aputrequest(wordFile, 'application/msword')
        request.processInputs()
        word = self.folder.obj1
        word = self.folder.test
 
        request = aputrequest(wordFile, 'application/msword')
        request.processInputs()
        word.PUT(request, request.RESPONSE)

src/p/r/Products.Archetypes-HEAD/Products/Archetypes/tests/test_marshaller.py   Products.Archetypes(Download)
from Products.Archetypes.tests.atsitetestcase import ATSiteTestCase
from Products.Archetypes.tests.utils import makeContent
from Products.Archetypes.tests.utils import aputrequest
from Products.Archetypes.tests.utils import PACKAGE_HOME
 
        # put requests don't have the luxury of being able to specify a
        # content type
        request = aputrequest(wordFile, 'application/msword')
        request.processInputs()
        word = self.folder.obj1
        rstFile.seek(0)
 
        request = aputrequest(rstFile, 'text/x-rst')
        # XXX PUT factory is using PARENTS to get an acquisition context
        request['PARENTS'] = (self.folder, self.portal)
        wordFile.seek(0)
 
        request = aputrequest(wordFile, 'application/msword')
        request.processInputs()
        word = self.folder.obj1
        word = self.folder.test
 
        request = aputrequest(wordFile, 'application/msword')
        request.processInputs()
        word.PUT(request, request.RESPONSE)