Re: [Zope-CMF] Testing skin scripts and templates using ZopeTestCase.Functional

2005-10-06 Thread Chris Withers
Paul Winkler wrote: Aha! I just confirmed that it works as you say in zopectl debug. (You do have to first make sure that the portal has a REQUEST attribute.) Yeah, I believe the canonical way is: from Testing.makerequest import makerequest portal = makerequest(self.portal)

Re: [Zope-CMF] Testing skin scripts and templates using ZopeTestCase.Functional

2005-10-05 Thread Jens Vagelpohl
def test_DocView(self): url = self.doc1.absolute_url_path() import pdb; pdb.set_trace() response = self.publish(url, self.basic_auth) Some stepping around with pdb reveals this: (Pdb) n /zope/ZopeSoftwareHome/lib/python/ZPublisher/Publish.py(101)publish() -

Re: [Zope-CMF] Testing skin scripts and templates using ZopeTestCase.Functional

2005-10-05 Thread Paul Winkler
Jens Vagelpohl said: def test_DocView(self): url = self.doc1.absolute_url_path() import pdb; pdb.set_trace() response = self.publish(url, self.basic_auth) Some stepping around with pdb reveals this: (Pdb) n

Re: [Zope-CMF] Testing skin scripts and templates using ZopeTestCase.Functional

2005-10-05 Thread Jens Vagelpohl
On 5 Oct 2005, at 23:07, Paul Winkler wrote: - request, bind=1) (Pdb) n NotFound: 'document_view' The machinery doesn't know which skin is selected I presume. You can force it by calling changeSkin on the skinnable object manager (the portal is one) to select a skin path as set up in the

Re: [Zope-CMF] Testing skin scripts and templates using ZopeTestCase.Functional

2005-10-05 Thread Tom Dossis
Paul Winkler wrote: Hi again :) I'm trying to use CMFTestCase along with ZopeTestCase.Functional to test my skin scripts. But how do I get them set up properly? Anybody have working examples of this? I wondered if there might be some in the Plone test suites but if so I didn't find any.