[z3-checkins] r5151 - in z3/Five/trunk/tests: . products/FiveTest
faassen at codespeak.net
faassen at codespeak.net
Thu Jun 17 19:20:12 MEST 2004
Author: faassen
Date: Thu Jun 17 19:20:05 2004
New Revision: 5151
Modified:
z3/Five/trunk/tests/products/FiveTest/configure.zcml
z3/Five/trunk/tests/test_five.py
Log:
Show that we can get back to the context object from the view, using
python:context.mymethod().
Note that paths don't yet work due to some issues with traversal adapters
not being present.
Modified: z3/Five/trunk/tests/products/FiveTest/configure.zcml
==============================================================================
--- z3/Five/trunk/tests/products/FiveTest/configure.zcml (original)
+++ z3/Five/trunk/tests/products/FiveTest/configure.zcml Thu Jun 17 19:20:05 2004
@@ -26,4 +26,10 @@
name="owl.html"
/>
+ <five:page
+ for=".interfaces.ISimpleContent"
+ template="flamingo.pt"
+ name="flamingo.html"
+ />
+
</configure>
Modified: z3/Five/trunk/tests/test_five.py
==============================================================================
--- z3/Five/trunk/tests/test_five.py (original)
+++ z3/Five/trunk/tests/test_five.py Thu Jun 17 19:20:05 2004
@@ -58,6 +58,13 @@
view = self.root.unrestrictedTraverse('testoid/owl.html')
data = view()
self.assertEquals(u'<p>2</p>\n', data)
+
+ def test_template_view_context(self):
+ self.root.manage_addProduct['FiveTest'].manage_addSimpleContent(
+ 'testoid', 'Testoid')
+ view = self.root.unrestrictedTraverse('testoid/flamingo.html')
+ data = view()
+ self.assertEquals(u'<p>Hello world</p>\n', data)
def test_view_backwards_compatibility(self):
self.root.manage_addProduct['FiveTest'].manage_addSimpleContent(
More information about the z3-checkins
mailing list