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
>>> browser = Browser()
>>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
Loading Zope, please stand by ... done (3.729s)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
File "/home/bashu/workspace/gadoz-shared/zope2.10/lib/python/zope/testbrowser/", line 220, in open File "/home/bashu/workspace/gadoz-shared/zope2.10/lib/python/mechanize/", line 177, in open File "/home/bashu/workspace/gadoz-shared/zope2.10/lib/python/mechanize/", line 202, in _mech_open File "/home/bashu/workspace/gadoz-shared/zope2.10/lib/python/mechanize/", line 234, in open
  File "/usr/lib/python2.4/", line 376, in _open
    '_open', req)
  File "/usr/lib/python2.4/", line 337, in _call_chain
    result = func(*args)
File "/home/bashu/work/gadoz/gadoz-shared/products/Five-1.5/Five/", line 64, in http_open
    return self.do_open(PublisherConnection, req)
  File "/usr/lib/python2.4/", line 993, in do_open
    h.request(req.get_method(), req.get_selector(),, headers)
File "/home/bashu/workspace/gadoz-shared/zope2.10/lib/python/zope/testbrowser/", line 80, in request File "/home/bashu/workspace/gadoz-shared/zope2.10/lib/python/Testing/ZopeTestCase/zopedoctest/", line 197, in http File "/home/bashu/workspace/gadoz-shared/zope2.10/lib/python/Testing/ZopeTestCase/zopedoctest/", line 110, in sync
AttributeError: 'NoneType' object has no attribute '_p_jar'

Totaly confused, again!

Zope3-users mailing list

Reply via email to