From 613a7e5972ac15c0c296307de47944bfb07969c0 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Tue, 23 Apr 2013 09:35:48 +0300 Subject: add a note about missing code --- docs/narr/testing.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/narr/testing.rst b/docs/narr/testing.rst index ec5952a7c..88d6904c7 100644 --- a/docs/narr/testing.rst +++ b/docs/narr/testing.rst @@ -222,6 +222,12 @@ function. raise HTTPForbidden return {'greeting':'hello'} +.. note:: + + This code implies that you have defined a renderer imperatively in a + relevant :class:`pyramid.config.Configurator` instance, + otherwise it would fail when run normally. + Without doing anything special during a unit test, the call to :func:`~pyramid.security.has_permission` in this view function will always return a ``True`` value. When a :app:`Pyramid` application starts normally, -- cgit v1.2.3