Sorry, I made an error in the previous post when I stated that
ftesting.zcml is not being parsed. It is in fact being parsed.
But I still can't figure why the authentication header is not allowing
the testbrowser object to 'view' @@contents.html.
On Wed, 2006-06-28 at 15:35 +1200, Darryl Cousins wrote:
> Hi All,
> I'm having trouble getting started with testbrowser.
> The problem is that zopeinstance/etc/ftesting.zcml is not being read.
> Could someone help me get started here please?
> The doc test -
> >>> from zope.testbrowser import Browser
> >>> browser = Browser()
> >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
> >>> browser = Browser('http://localhost/contents.html')
> The testrunner -
> def test_suite():
> return unittest.TestSuite((
> optionflags=doctest.ELLIPSIS |
> And from zopeinstance/ I run the test:
> ./bin/test -vv -s mypkg/browser
> I get HTTPError: HTTP Error 401: Unauthorized
> Which suggests that zopeinstance/etc/ftesting.zcml is not being parsed
> (I tested that by putting bad data in ftesting.zcml which produced no
> Best regards,
> Darryl Cousins
> Zope3-users mailing list
Zope3-users mailing list