From d75fe70228c89e3606e51a4d5775faf549252a90 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 30 Sep 2009 03:27:28 +0000 Subject: - The import of ``repoze.bfg.view.NotFound`` is deprecated in favor of ``repoze.bfg.exceptions.NotFound``. The old location still functions, but emits a deprecation warning. - The import of ``repoze.bfg.security.Unauthorized`` is deprecated in favor of ``repoze.bfg.exceptions.Forbidden``. The old location still functions but emits a deprecation warning. The rename from ``Unauthorized`` to ``Forbidden`` brings parity to the the name of the exception and the system view it invokes when raised. - New ``repoze.bfg.exceptions`` module was created to house exceptions that were previously sprinkled through various modules. - An ``exceptions`` API chapter was added, documenting the new ``repoze.bfg.exceptions`` module. --- repoze/bfg/tests/test_testing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'repoze/bfg/tests/test_testing.py') diff --git a/repoze/bfg/tests/test_testing.py b/repoze/bfg/tests/test_testing.py index c302bd9f5..938115ecd 100644 --- a/repoze/bfg/tests/test_testing.py +++ b/repoze/bfg/tests/test_testing.py @@ -149,7 +149,7 @@ class TestTestingFunctions(unittest.TestCase): def test_registerView_with_permission_denying(self): from repoze.bfg import testing - from repoze.bfg.security import Unauthorized + from repoze.bfg.exceptions import Forbidden def view(context, request): """ """ view = testing.registerView('moo.html', view=view, permission='bar') @@ -157,7 +157,7 @@ class TestTestingFunctions(unittest.TestCase): import types self.failUnless(isinstance(view, types.FunctionType)) from repoze.bfg.view import render_view_to_response - self.assertRaises(Unauthorized, render_view_to_response, + self.assertRaises(Forbidden, render_view_to_response, None, None, 'moo.html') def test_registerView_with_permission_denying2(self): -- cgit v1.2.3