[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/session/ftests.py
De-<script>-ified tst.
Jim Fulton
jim at zope.com
Sun Jul 25 10:07:00 EDT 2004
Log message for revision 26751:
De-<script>-ified tst.
<script> is an optional tentative controversial zpt feature that
sessions should not depend on.
In addition, exceptions are something not well handled in untrusted
python code. We will soon disable try/except in untrusted python code
until we have figured out how to do it.
Finally, the zpt session support should should move into a separate
package, which could be a sub-package of session. The reason is that
zpt is, theoretically, an optional feature. Someone might want to have
sessions without having zpt.
Changed:
U Zope3/trunk/src/zope/app/session/ftests.py
-=-
Modified: Zope3/trunk/src/zope/app/session/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/session/ftests.py 2004-07-24 11:36:27 UTC (rev 26750)
+++ Zope3/trunk/src/zope/app/session/ftests.py 2004-07-25 14:07:00 UTC (rev 26751)
@@ -21,14 +21,12 @@
class ZPTSessionTest(BrowserTestCase):
content = u'''
- <div tal:define="session request/session:products.foo" tal:omit-tag="">
- <script type="text/server-python">
- try:
- session['count'] += 1
- except KeyError:
- session['count'] = 1
- </script>
-
+ <div tal:define="
+ session request/session:products.foo;
+ dummy python:session.__setitem__(
+ 'count',
+ session.get('count', 0) + 1)
+ " tal:omit-tag="">
<span tal:replace="session/count" />
</div>
'''
More information about the Zope3-Checkins
mailing list