[Checkins] SVN: megrok.layout/trunk/src/megrok/layout/ Added a new test
Souheil CHELFOUH
souheil at chelfouh.com
Mon Oct 18 05:57:41 EDT 2010
Log message for revision 117644:
Added a new test
Changed:
A megrok.layout/trunk/src/megrok/layout/configure.zcml
A megrok.layout/trunk/src/megrok/layout/tests/test_renderandtemplate.py
A megrok.layout/trunk/src/megrok/layout/tests/test_renderandtemplate_templates/
A megrok.layout/trunk/src/megrok/layout/tests/test_renderandtemplate_templates/mylayout.pt
-=-
Added: megrok.layout/trunk/src/megrok/layout/configure.zcml
===================================================================
--- megrok.layout/trunk/src/megrok/layout/configure.zcml (rev 0)
+++ megrok.layout/trunk/src/megrok/layout/configure.zcml 2010-10-18 09:57:41 UTC (rev 117644)
@@ -0,0 +1,9 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:grok="http://namespaces.zope.org/grok">
+
+ <include package="megrok.layout" file="meta.zcml" />
+ <include package="grokcore.view"/>
+
+
+</configure>
Added: megrok.layout/trunk/src/megrok/layout/tests/test_renderandtemplate.py
===================================================================
--- megrok.layout/trunk/src/megrok/layout/tests/test_renderandtemplate.py (rev 0)
+++ megrok.layout/trunk/src/megrok/layout/tests/test_renderandtemplate.py 2010-10-18 09:57:41 UTC (rev 117644)
@@ -0,0 +1,28 @@
+"""
+ >>> grok.testing.grok(__name__)
+ Traceback (most recent call last):
+ ...
+ ConfigurationExecutionError: <class 'martian.error.GrokError'>: Multiple possible ways to render view <class 'megrok.layout.tests.test_renderandtemplate.MyLayout'>. It has both a 'render' method as well as an associated template.
+ <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 render(self):
+ return ""
+
+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
Added: megrok.layout/trunk/src/megrok/layout/tests/test_renderandtemplate_templates/mylayout.pt
===================================================================
--- megrok.layout/trunk/src/megrok/layout/tests/test_renderandtemplate_templates/mylayout.pt (rev 0)
+++ megrok.layout/trunk/src/megrok/layout/tests/test_renderandtemplate_templates/mylayout.pt 2010-10-18 09:57:41 UTC (rev 117644)
@@ -0,0 +1 @@
+<div> </div>
More information about the checkins
mailing list