[Checkins] SVN: grokcore.view/new/src/grokcore/view/ftests/view/handle_exception.py Turns out this test actually tests an aspect of Grok's publication.

Philipp von Weitershausen philikon at philikon.de
Sat Aug 2 10:15:54 EDT 2008


Log message for revision 89232:
  Turns out this test actually tests an aspect of Grok's publication.
  

Changed:
  D   grokcore.view/new/src/grokcore/view/ftests/view/handle_exception.py

-=-
Deleted: grokcore.view/new/src/grokcore/view/ftests/view/handle_exception.py
===================================================================
--- grokcore.view/new/src/grokcore/view/ftests/view/handle_exception.py	2008-08-02 14:12:37 UTC (rev 89231)
+++ grokcore.view/new/src/grokcore/view/ftests/view/handle_exception.py	2008-08-02 14:15:54 UTC (rev 89232)
@@ -1,41 +0,0 @@
-"""
-The handleException() method has a special case that might introduce a proxy
-and cause the grok security to fail, we have a simple test here that assures
-that we don't hit this:
-
-  >>> from zope.testbrowser.testing import Browser
-  >>> browser = Browser()
-  >>> browser.open("http://localhost/@@cave")
-  Traceback (most recent call last):
-  HTTPError: HTTP Error 500: Internal Server Error
-  >>> browser.contents
-  "It's gone!"
-
-"""
-
-import zope.interface
-import grokcore.view as grok
-
-
-class CaveWasRobbedError(Exception):
-    pass
-
-
-class Cave(grok.View):
-
-    grok.context(zope.interface.Interface)
-
-    fire = "It's gone!"
-
-    def render(self):
-        raise CaveWasRobbedError("EVERYTHING GONE! GROK ANGRY!")
-
-
-class CaveErrorView(grok.View):
-
-    grok.context(CaveWasRobbedError)
-    grok.name("index.html")
-
-    def render(self):
-        self.request.response.setStatus(500)
-        return self.context.__parent__.fire



More information about the Checkins mailing list