[Checkins] SVN: grok/trunk/src/grok/ test the case where we can't find a model

Philipp von Weitershausen philikon at philikon.de
Sat Oct 14 13:23:00 EDT 2006


Log message for revision 70616:
  test the case where we can't find a model
  

Changed:
  U   grok/trunk/src/grok/adapter.txt
  A   grok/trunk/src/grok/tests/nomodel.py

-=-
Modified: grok/trunk/src/grok/adapter.txt
===================================================================
--- grok/trunk/src/grok/adapter.txt	2006-10-14 17:18:12 UTC (rev 70615)
+++ grok/trunk/src/grok/adapter.txt	2006-10-14 17:23:00 UTC (rev 70616)
@@ -12,3 +12,10 @@
   True
   >>> isinstance(home, Home)
   True
+
+If no model can be found in the module, we get an error:
+
+  >>> grok.grok('grok.tests.nomodel')
+  Traceback (most recent call last):
+    ...
+  GrokError: Adapter without context

Added: grok/trunk/src/grok/tests/nomodel.py
===================================================================
--- grok/trunk/src/grok/tests/nomodel.py	2006-10-14 17:18:12 UTC (rev 70615)
+++ grok/trunk/src/grok/tests/nomodel.py	2006-10-14 17:23:00 UTC (rev 70616)
@@ -0,0 +1,8 @@
+import grok
+from zope import interface
+
+class IHome(interface.Interface):
+    pass
+
+class Home(grok.Adapter):
+    grok.implements(IHome)


Property changes on: grok/trunk/src/grok/tests/nomodel.py
___________________________________________________________________
Name: svn:eol-style
   + native



More information about the Checkins mailing list