[z3-checkins] r5157 - in z3/Five/trunk/tests: . products/FiveTest
faassen at codespeak.net
faassen at codespeak.net
Thu Jun 17 20:21:47 MEST 2004
Author: faassen
Date: Thu Jun 17 20:21:46 2004
New Revision: 5157
Modified:
z3/Five/trunk/tests/products/FiveTest/configure.zcml
z3/Five/trunk/tests/test_five.py
Log:
Add a few more tests in a more complicated view.
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 20:21:46 2004
@@ -38,4 +38,11 @@
name="flamingo2.html"
/>
+ <five:page
+ for=".interfaces.ISimpleContent"
+ class=".browser.SimpleContentView"
+ template="condor.pt"
+ name="condor.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 20:21:46 2004
@@ -73,7 +73,19 @@
'testoid', 'Testoid')
old_view = self.root.unrestrictedTraverse('testoid/direct')
self.assertEquals('Direct traversal worked', old_view())
+
+ def test_zpt_things(self):
+ self.root.manage_addProduct['FiveTest'].manage_addSimpleContent(
+ 'testoid', 'Testoid')
+ view = self.root.unrestrictedTraverse('testoid/condor.html')
+ expected = """\
+<p>Hello world</p>
+<p>The eagle has landed</p>
+<p>Hello world</p>
+"""
+ self.assertEquals(expected, view())
+
if __name__ == '__main__':
framework()
else:
More information about the z3-checkins
mailing list