[Product-Developers] PAS 1.5.3 and 1.6.1 breaks my testbrowser tests in Plone 2.5
Sasha Vincic
sasha.vincic at valentinewebsystems.se
Thu Jul 23 08:07:38 UTC 2009
Hi,
With PAS 1.5.3 and 1.6.1 in Plone 2.5 my browser test fails in a very
strange way.
I can go to login_form and login, the returned page looks ok(logged in
info) and cookie is set but next url I try I get Unauthorized binding
context and the security manager returns anonymous, and with pdb I don't
see any users in the acl_folders of zope or plone. Without the upgraded
PAS my tests work.
I upgraded to 1.5.3 because I use plone.session and there was a bug in
PAS that didn't look for exact userid.
I upgraded to 1.6.1 to see if the cookie handling would make my test
work better but no difference. browser.cookies.keys() works and looks ok.
Last line gives Unauthorized with upgraded PAS.
........................................................
We're going to use the test browser to test the form:
>>> from Products.Five.testbrowser import Browser
>>> browser = Browser()
>>> browser.handleErrors = False
>>> self.portal.error_log._ignored_exceptions = ()
Log in to the CMS so that we can edit the themes:
>>> from Products.PloneTestCase.setup import portal_owner,
default_password
>>> url = self.portal.absolute_url() + '/login_form'
>>> browser.open(url)
>>> browser.getControl(name='__ac_name').value = portal_owner
>>> browser.getControl(name='__ac_password').value = default_password
>>> browser.getControl(name='submit').click()
The problem occurs when rendering the form and the ThemesOrderedWidget
asks for
the themes vocabulary terms. Let's make sure that the ThemesEditForm
from
eea.themecentre.browser.themes renders OK with our empty themes tag:
>>> url = newsitem.absolute_url() + '/@@themes_edit.html'
>>> browser.open(url)
..................................................
More information about the Product-Developers
mailing list