summaryrefslogtreecommitdiff
path: root/repoze/bfg/tests/test_view.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-01-03 03:39:30 +0000
committerChris McDonough <chrism@agendaless.com>2010-01-03 03:39:30 +0000
commiteecdbc34962b00e35d41039af014462cf558acee (patch)
tree784bfdf054d6f4846fb1817d1ba7b01792792dcc /repoze/bfg/tests/test_view.py
parent1dff935445ff293a7434f074c1f6bb7304174ec2 (diff)
downloadpyramid-eecdbc34962b00e35d41039af014462cf558acee.tar.gz
pyramid-eecdbc34962b00e35d41039af014462cf558acee.tar.bz2
pyramid-eecdbc34962b00e35d41039af014462cf558acee.zip
Features
-------- - The ``Configurator.add_view`` method now accepts an argument named ``context``. This is an alias for the older argument named ``for_``; it is preferred over ``for_``, but ``for_`` will continue to be supported "forever". - The ``view`` ZCML directive now accepts an attribute named ``context``. This is an alias for the older attribute named ``for``; it is preferred over ``for``, but ``for`` will continue to be supported "forever". - The ``Configurator.add_route`` method now accepts an argument named ``view_context``. This is an alias for the older argument named ``view_for``; it is preferred over ``view_for``, but ``view_for`` will continue to be supported "forever". - The ``route`` ZCML directive now accepts an attribute named ``view_context``. This is an alias for the older attribute named ``view_for``; it is preferred over ``view_for``, but ``view_for`` will continue to be supported "forever". Documentation and Paster Templates ---------------------------------- - All uses of the ``Configurator.add_view`` method that used its ``for_`` argument now use the ``context``argument instead. - All uses of the ``Configurator.add_route`` method that used its ``view_for`` argument now use the ``view_context``argument instead. - All uses of the ``view`` ZCML directive that used its ``for`` attribute now use the ``context`` attribute instead. - All uses of the ``route`` ZCML directive that used its ``view_for`` attribute now use the ``view_context`` attribute instead.
Diffstat (limited to 'repoze/bfg/tests/test_view.py')
-rw-r--r--repoze/bfg/tests/test_view.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/repoze/bfg/tests/test_view.py b/repoze/bfg/tests/test_view.py
index 677c15bc8..94b896893 100644
--- a/repoze/bfg/tests/test_view.py
+++ b/repoze/bfg/tests/test_view.py
@@ -289,7 +289,7 @@ class TestBFGViewDecorator(unittest.TestCase):
decorator = self._makeOne()
self.assertEqual(decorator.name, '')
self.assertEqual(decorator.request_type, None)
- self.assertEqual(decorator.for_, None)
+ self.assertEqual(decorator.context, None)
self.assertEqual(decorator.permission, None)
def test_create_nondefaults(self):
@@ -297,7 +297,7 @@ class TestBFGViewDecorator(unittest.TestCase):
permission='foo')
self.assertEqual(decorator.name, None)
self.assertEqual(decorator.request_type, None)
- self.assertEqual(decorator.for_, None)
+ self.assertEqual(decorator.context, None)
self.assertEqual(decorator.permission, 'foo')
def test_call_function(self):
@@ -308,7 +308,7 @@ class TestBFGViewDecorator(unittest.TestCase):
self.failUnless(wrapped is foo)
settings = wrapped.__bfg_view_settings__[0]
self.assertEqual(settings['permission'], None)
- self.assertEqual(settings['for_'], None)
+ self.assertEqual(settings['context'], None)
self.assertEqual(settings['request_type'], None)
def test_call_oldstyle_class(self):
@@ -319,7 +319,7 @@ class TestBFGViewDecorator(unittest.TestCase):
self.failUnless(wrapped is foo)
settings = wrapped.__bfg_view_settings__[0]
self.assertEqual(settings['permission'], None)
- self.assertEqual(settings['for_'], None)
+ self.assertEqual(settings['context'], None)
self.assertEqual(settings['request_type'], None)
def test_call_newstyle_class(self):
@@ -330,7 +330,7 @@ class TestBFGViewDecorator(unittest.TestCase):
self.failUnless(wrapped is foo)
settings = wrapped.__bfg_view_settings__[0]
self.assertEqual(settings['permission'], None)
- self.assertEqual(settings['for_'], None)
+ self.assertEqual(settings['context'], None)
self.assertEqual(settings['request_type'], None)
def test_stacking(self):