[Zope3-Users] Getting started with testbrowser

Baiju M baiju.m.mail at gmail.com
Tue Jun 27 23:44:09 EDT 2006


On 6/28/06, Darryl Cousins <darryl at darrylcousins.net.nz> 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 -
> zopeinstance/lib/python/mypkg/browser/README.txt:
>
>     >>> from zope.testbrowser import Browser
>     >>> browser = Browser()
>     >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
>     >>> browser = Browser('http://localhost/contents.html')

See in the second line you created 'browser' object and set 'Authorization'
now you should open a URL like
browser.open('http://localhost/contents.html')

Here, in fourth line you again created another 'browser' object
without 'Authorization'

Regards,
Baiju M


More information about the Zope3-users mailing list