[Zope-CMF] Re: CMFTestCase: Best way to create the CMF site?

Stefan H. Holek stefan at epy.co.at
Wed Oct 5 02:28:26 EDT 2005


I see two options:

a) Use a different portal name

     portal_name = 'mysite'
     CMFTestCase.setupCMFSite(portal_name)

b) Use getPortal() to create a new portal per test

     def getPortal(self):
         manage_addCMFSite(self.app, portal_name)
         return getattr(self.app, portal_name)

Stefan


On 5. Okt 2005, at 01:08, Paul Winkler wrote:

> At one time, I naively had it set up in getPortal() but that seems
> to have worked only in one product and only by bizarre coincidence  
> as it
> failed in every other product test I tried it with.
> (Random assortment of BadRequest and ReadConflictErrors, I was
> never able to sort it all out.) So that seems unlikely to be the Right
> Thing (tm).

--
Anything that happens, happens.  --Douglas Adams




More information about the Zope-CMF mailing list