[Checkins] SVN: megrok.layout/trunk/src/megrok/layout/tests/test_norenderortemplatelayout.py Bug no template or render in layout

Souheil CHELFOUH souheil at chelfouh.com
Mon Oct 18 05:57:23 EDT 2010


Log message for revision 117641:
  Bug no template or render in layout

Changed:
  A   megrok.layout/trunk/src/megrok/layout/tests/test_norenderortemplatelayout.py

-=-
Added: megrok.layout/trunk/src/megrok/layout/tests/test_norenderortemplatelayout.py
===================================================================
--- megrok.layout/trunk/src/megrok/layout/tests/test_norenderortemplatelayout.py	                        (rev 0)
+++ megrok.layout/trunk/src/megrok/layout/tests/test_norenderortemplatelayout.py	2010-10-18 09:57:23 UTC (rev 117641)
@@ -0,0 +1,27 @@
+"""
+  >>> grok.testing.grok(__name__)
+  Traceback (most recent call last):
+  ...
+  ConfigurationExecutionError: <class 'martian.error.GrokError'>: View <class 'megrok.layout.tests.test_norenderortemplatelayout.MyLayout'> has no associated template or 'render' method.
+    in:
+  <BLANKLINE>
+"""
+
+import grokcore.component as grok
+from grokcore.view import View
+from megrok.layout import Layout
+from zope.interface import Interface
+
+
+class MyLayout(Layout):
+    grok.context(Interface)
+
+
+def test_suite():
+    from zope.testing import doctest
+    from megrok.layout.ftests import FunctionalLayer
+    suite = doctest.DocTestSuite(
+        optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS
+        )
+    suite.layer = FunctionalLayer
+    return suite



More information about the checkins mailing list