[Zope3-Users] Re: zope.testbrowser and ZMI?

Philipp von Weitershausen philipp at weitershausen.de
Fri Mar 2 10:22:44 EST 2007


Basil Shubin wrote:
> Philipp von Weitershausen wrote:
>> Stephan Richter wrote:
>>> On Thursday 01 March 2007 10:17, Basil Shubin wrote:
>>>>>>  >>> browser.addHeader('Authorization', 'Basic admin:admin')
>>>
>>> This authorization is not correct. You need to use:
>>>
>>>   >>> manager.addHeader('Authorization', 'Basic mgr:mgrpw')
>>>
>>> At least this is the default.
>>
>> In most Zope 3 ftest layers it is. I believe he's on Zope2, though.
>>
>> I think his problem is that he's using the Zope 3 test browser in Zope 
>> 2. He should be using Products.Five.testbrowser.Browser.
> 
>  >>> from Five.testbrowser import Browser

That's Products.Five....

>  >>> browser = Browser()
>  >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
>  >>> browser.open('http://localhost:8080/manage')
> Loading Zope, please stand by ... done (3.729s)
> Traceback (most recent call last):
...
> AttributeError: 'NoneType' object has no attribute '_p_jar'
> 
> Totaly confused, again!

Are you using FunctionalDocFileSuite from Testing.ZopeTestCase? I bet not...

-- 
http://worldcookery.com -- Professional Zope documentation and training
Next Zope 3 training at Camp5: http://trizpug.org/boot-camp/camp5



More information about the Zope3-users mailing list