diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-01-11 22:43:27 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-01-11 22:43:27 +0000 |
| commit | b0a24149ffc4dd3b945b496e5cdb01111c8cf29a (patch) | |
| tree | da0d31fa9c46eb4e990c0df3dd116e8fa38dcd5c /repoze/bfg/tests/test_wsgi.py | |
| parent | d69635eb6237055e8b3ccedeeaa7114a7beed057 (diff) | |
| download | pyramid-b0a24149ffc4dd3b945b496e5cdb01111c8cf29a.tar.gz pyramid-b0a24149ffc4dd3b945b496e5cdb01111c8cf29a.tar.bz2 pyramid-b0a24149ffc4dd3b945b496e5cdb01111c8cf29a.zip | |
- Improve test coverage.
- Remove old cold which attempts to recover from trying to unpickle a
``z3c.pt`` template; Chameleon has been the templating engine for a
good long time now. Running repoze.bfg against a sandbox that has
pickled ``z3c.pt`` templates it will now just fail with an
unpickling error, but can be fixed by deleting the template cache
files.
Diffstat (limited to 'repoze/bfg/tests/test_wsgi.py')
| -rw-r--r-- | repoze/bfg/tests/test_wsgi.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/repoze/bfg/tests/test_wsgi.py b/repoze/bfg/tests/test_wsgi.py index d905350d6..4c36850b6 100644 --- a/repoze/bfg/tests/test_wsgi.py +++ b/repoze/bfg/tests/test_wsgi.py @@ -18,6 +18,19 @@ class WSGIAppTests(unittest.TestCase): self.assertEqual(response.headerlist, headerlist) self.assertEqual(response.app_iter, [body]) + def test_decorator_startresponse_uncalled(self): + body = 'Unauthorized' + headerlist = [ ('Content-Type', 'text/plain'), + ('Content-Length', len(body)) ] + status = '401 Unauthorized' + def real_wsgiapp(environ, start_response): + return [body] + from repoze.bfg.wsgi import wsgiapp + wrapped = wsgiapp(real_wsgiapp) + context = DummyContext() + request = DummyRequest({}) + self.assertRaises(RuntimeError, wrapped, context, request) + class DummyContext: pass |
