diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2014-09-11 08:59:23 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-09-11 08:59:23 -0400 |
commit | aa13578fdd118a1c98d9b1d4effc5bca64099b82 (patch) | |
tree | d531f82bd3ccc0dede5f7cad41fb620db7457bfe | |
parent | a2954ba9c2062e55491b61d0f37f0bd78d315ade (diff) | |
parent | 9dc215e43a1aab148ce10a68006fb15be4f10d4f (diff) | |
download | cherrypy-aa13578fdd118a1c98d9b1d4effc5bca64099b82.tar.gz |
Merge fix from 3.2.x
-rw-r--r-- | cherrypy/_cptools.py | 2 | ||||
-rw-r--r-- | cherrypy/test/test_tools.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/cherrypy/_cptools.py b/cherrypy/_cptools.py index ce574492..06a56e87 100644 --- a/cherrypy/_cptools.py +++ b/cherrypy/_cptools.py @@ -224,7 +224,7 @@ class HandlerWrapperTool(Tool): self._name = name self._priority = priority - def callable(self, debug=False): + def callable(self, *args, **kwargs): innerfunc = cherrypy.serving.request.handler def wrap(*args, **kwargs): diff --git a/cherrypy/test/test_tools.py b/cherrypy/test/test_tools.py index 6e593216..4fb1a555 100644 --- a/cherrypy/test/test_tools.py +++ b/cherrypy/test/test_tools.py @@ -108,6 +108,7 @@ class ToolTests(helper.CPWebCase): cherrypy.tools.rotator = cherrypy.Tool('before_finalize', Rotator()) def stream_handler(next_handler, *args, **kwargs): + assert cherrypy.request.config.get('tools.streamer.arg') == 'arg value' cherrypy.response.output = o = BytesIO() try: response = next_handler(*args, **kwargs) @@ -126,10 +127,11 @@ class ToolTests(helper.CPWebCase): index.exposed = True def tarfile(self): + assert cherrypy.request.config.get('tools.streamer.arg') == 'arg value' cherrypy.response.output.write(ntob('I am ')) cherrypy.response.output.write(ntob('a tarfile')) tarfile.exposed = True - tarfile._cp_config = {'tools.streamer.on': True} + tarfile._cp_config = {'tools.streamer.on': True, 'tools.streamer.arg': 'arg value'} def euro(self): hooks = list(cherrypy.request.hooks['before_finalize']) |