diff options
| author | Michael Merickel <michael@merickel.org> | 2011-08-23 02:40:16 -0500 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2011-08-23 02:40:49 -0500 |
| commit | 885e66892a9f04f35689b135a1ee5879d4a7aa4f (patch) | |
| tree | d3d4953757e2f75becec8af1665df379b79103f8 | |
| parent | f1db0884ec6d4e55d5136cb67c9581907280f9c9 (diff) | |
| download | pyramid-885e66892a9f04f35689b135a1ee5879d4a7aa4f.tar.gz pyramid-885e66892a9f04f35689b135a1ee5879d4a7aa4f.tar.bz2 pyramid-885e66892a9f04f35689b135a1ee5879d4a7aa4f.zip | |
Added a test to verify attaching views to non-existant routes.
| -rw-r--r-- | pyramid/tests/test_config/test_init.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pyramid/tests/test_config/test_init.py b/pyramid/tests/test_config/test_init.py index ea4bdcac3..454db9d0f 100644 --- a/pyramid/tests/test_config/test_init.py +++ b/pyramid/tests/test_config/test_init.py @@ -1933,6 +1933,14 @@ pyramid.tests.test_config.dummy_include2""", self.assertNotEqual(wrapper, None) self.assertEqual(wrapper(None, None), 'OK') + def test_add_view_with_nonexistant_route_name(self): + from pyramid.renderers import null_renderer + from zope.configuration.config import ConfigurationExecutionError + view = lambda *arg: 'OK' + config = self._makeOne() + config.add_view(view=view, route_name='foo', renderer=null_renderer) + self.assertRaises(ConfigurationExecutionError, config.commit) + def test_add_view_with_route_name_exception(self): from pyramid.renderers import null_renderer from zope.interface import implementedBy |
