fix test failures with csrf protection and locking behavior
This commit is contained in:
parent
f5f2beff10
commit
1a04b5b042
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user