[Checkins] SVN: grok/trunk/src/grok/tests/view/templatenotfound.py
test that pointing to a non-existing template raises an error.
Philipp von Weitershausen
philikon at philikon.de
Mon Oct 16 03:25:25 EDT 2006
Log message for revision 70670:
test that pointing to a non-existing template raises an error.
Changed:
A grok/trunk/src/grok/tests/view/templatenotfound.py
-=-
Added: grok/trunk/src/grok/tests/view/templatenotfound.py
===================================================================
--- grok/trunk/src/grok/tests/view/templatenotfound.py 2006-10-16 07:20:58 UTC (rev 70669)
+++ grok/trunk/src/grok/tests/view/templatenotfound.py 2006-10-16 07:25:24 UTC (rev 70670)
@@ -0,0 +1,20 @@
+"""
+This should fail because ``grok.template`` points to a non-existing
+template:
+
+ >>> grok.grok(__name__)
+ Traceback (most recent call last):
+ ...
+ GrokError: View <class 'grok.tests.view.templatenotfound.Painting'>
+ has no associated template or 'render' method.
+
+"""
+import grok
+
+class Mammoth(grok.Model):
+ pass
+
+class Painting(grok.View):
+ grok.template('cavepainting')
+
+# no cavepainting template here
Property changes on: grok/trunk/src/grok/tests/view/templatenotfound.py
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the Checkins
mailing list