[Checkins] SVN: grok/branches/ftesting-security/src/grok/ftests/view/index.py added failing example functional test

Wolfgang Schnerring wosc at wosc.de
Mon Oct 16 12:01:53 EDT 2006


Log message for revision 70708:
  added failing example functional test

Changed:
  A   grok/branches/ftesting-security/src/grok/ftests/view/index.py

-=-
Added: grok/branches/ftesting-security/src/grok/ftests/view/index.py
===================================================================
--- grok/branches/ftesting-security/src/grok/ftests/view/index.py	2006-10-16 16:01:16 UTC (rev 70707)
+++ grok/branches/ftesting-security/src/grok/ftests/view/index.py	2006-10-16 16:01:52 UTC (rev 70708)
@@ -0,0 +1,30 @@
+"""
+  >>> import grok
+  >>> from grok.ftests.view.index import Mammoth
+  >>> grok.grok('grok.ftests.view.index')
+  >>> getRootFolder()["manfred"] = Mammoth()
+
+  >>> from zope.testbrowser.testing import Browser
+  >>> browser = Browser()
+  >>> browser.handleErrors = False
+  >>> browser.open("http://localhost/manfred/@@painting")
+  >>> print browser.contents
+  <html>
+  <body>
+  <h1>Hello, world!</h1>
+  </body>
+  </html>
+
+"""
+import grok
+
+class Mammoth(grok.Model):
+    pass
+
+painting = grok.PageTemplate("""\
+<html>
+<body>
+<h1>Hello, world!</h1>
+</body>
+</html>
+""")



More information about the Checkins mailing list