[Checkins] SVN: megrok.kss/trunk/src/megrok/kss/tests/kss.py Add test that checks for permission problems with grok publisher (grok bug #309567).
Uli Fouquet
uli at gnufix.de
Thu Dec 18 22:08:04 EST 2008
Log message for revision 94182:
Add test that checks for permission problems with grok publisher (grok bug #309567).
Changed:
U megrok.kss/trunk/src/megrok/kss/tests/kss.py
-=-
Modified: megrok.kss/trunk/src/megrok/kss/tests/kss.py
===================================================================
--- megrok.kss/trunk/src/megrok/kss/tests/kss.py 2008-12-19 00:41:55 UTC (rev 94181)
+++ megrok.kss/trunk/src/megrok/kss/tests/kss.py 2008-12-19 03:08:01 UTC (rev 94182)
@@ -21,6 +21,32 @@
</commands>
</kukit>
<BLANKLINE>
+
+The KSS action can be called by non-authenticated users. We put our
+model into the ZODB to make it browsable::
+
+ >>> from zope.app.testing.functional import getRootFolder
+ >>> root = getRootFolder()
+ >>> root['model'] = mymodel
+
+Now we start the test-browser and try to access our action as
+non-authenticated users::
+
+ >>> from zope.testbrowser.testing import Browser
+ >>> browser = Browser()
+ >>> browser.open('http://localhost/model/@@testview/@@getId')
+ >>> print browser.contents
+ <?xml version="1.0" ?>
+ <kukit xmlns="http://www.kukit.org/commands/1.1">
+ <commands>
+ <command selector="#click-me" name="replaceHTML"
+ selectorType="">
+ <param name="html"><![CDATA[Something silly!]]></param>
+ <param name="withKssSetup">True</param>
+ </command>
+ </commands>
+ </kukit>
+
"""
import grok
More information about the Checkins
mailing list