Skip to content

Commit

Permalink
fix markup tests with auto csrf
Browse files Browse the repository at this point in the history
  • Loading branch information
vangheem committed Mar 12, 2014
1 parent 219255a commit dcf92ad
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plone/app/controlpanel/tests/markup.txt
Expand Up @@ -5,9 +5,13 @@ Viewing the markup control panel
--------------------------------

>>> self.loginAsManager()
>>> self.browser.open('http://nohost/plone/@@markup-controlpanel')
>>> from plone.protect.authenticator import createToken

It is only necessary in the test here to add the token.

This comment has been minimized.

Copy link
@davisagli

davisagli Mar 12, 2014

Member

Why is it necessary?

This comment has been minimized.

Copy link
@vangheem

vangheem Mar 12, 2014

Author Member

In this test, this form writes on read. Couldn't reproduce clicking through a plone site though.

This comment has been minimized.

Copy link
@davisagli

davisagli Mar 12, 2014

Member

Well yeah, I meant what does it write on read. Because if it happens here then maybe there's a case when it happens in real life, which we should understand. I guess we'll find out...

This comment has been minimized.

Copy link
@vangheem

vangheem Mar 12, 2014

Author Member

IIRC, it was portlets and users. I should have documented...


>>> self.browser.open('http://nohost/plone/@@markup-controlpanel?_authenticator=' + createToken())
>>> self.browser.url
'http://nohost/plone/@@markup-controlpanel'
'http://nohost/plone/@@markup-controlpanel...'

We have two controls, one for the default type and a multi selection for
alternative formats:
Expand Down

0 comments on commit dcf92ad

Please sign in to comment.