fix test failures with csrf protection and locking behavior

This commit is contained in:
vangheem 2015-05-08 12:06:29 -05:00
parent f5f2beff10
commit 1a04b5b042

View File

@ -464,7 +464,13 @@ Login as admin.
Edit the content object.
>>> browser.open("http://nohost/plone/doc1/edit")
>>> from plone.protect.authenticator import _getKeyring
>>> import hmac
>>> from hashlib import sha1 as sha
>>> ring = _getKeyring('foo')
>>> secret = ring.random()
>>> token = hmac.new(secret, 'admin', sha).hexdigest()
>>> browser.open("http://nohost/plone/doc1/edit?_authenticator=" + token)
>>> browser.getControl(name='form.widgets.IRichText.text').value = "Lorem ipsum"
>>> browser.getControl('Save').click()