From 4df5751de28947538da491dc8ebe0dfb27f742d5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 19 Jul 2008 01:17:21 +0000 Subject: - The concept of "view factories" was removed in favor of always calling a view, which is a callable that returns a response directly (as opposed to returning a view). As a result, the ``factory`` attribute in the bfg:view ZCML statement has been renamed to ``view``. Various interface names were changed also. - ``render_template`` and ``render_transform`` no longer return a Response object. Instead, these return strings. The old behavior can be obtained by using ``render_template_to_response`` and ``render_transform_to_response``. --- repoze/bfg/tests/test_view.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 repoze/bfg/tests/test_view.py (limited to 'repoze/bfg/tests/test_view.py') diff --git a/repoze/bfg/tests/test_view.py b/repoze/bfg/tests/test_view.py deleted file mode 100644 index a78fe514a..000000000 --- a/repoze/bfg/tests/test_view.py +++ /dev/null @@ -1,34 +0,0 @@ -import unittest - -from zope.component.testing import PlacelessSetup - -class Base(PlacelessSetup): - def setUp(self): - PlacelessSetup.setUp(self) - - def tearDown(self): - PlacelessSetup.tearDown(self) - - def _zcmlConfigure(self): - import repoze.bfg - import zope.configuration.xmlconfig - zope.configuration.xmlconfig.file('configure.zcml', package=repoze.bfg) - - def _getTemplatePath(self, name): - import os - here = os.path.abspath(os.path.dirname(__file__)) - return os.path.join(here, 'fixtures', name) - -class ViewFactoryTests(unittest.TestCase): - def _getTargetClass(self): - from repoze.bfg.view import ViewFactory - return ViewFactory - - def _makeOne(self, *arg, **kw): - klass = self._getTargetClass() - return klass(*arg, **kw) - - def test_call(self): - view = self._makeOne(None, None) - self.assertRaises(NotImplementedError, view) - -- cgit v1.2.3