From 3cb5cfbbaea978820ad9014e1ccbd034314c7ddd Mon Sep 17 00:00:00 2001 From: Jen Montes Date: Sun, 8 Feb 2015 18:29:47 -0500 Subject: [PATCH] docs: Change complex example to match new middleware feature The `process_response` method of `JSONTranslator` is missing the `resource` argument in order to fully comply with the new middleware feature. Closes #443 --- README.md | 2 +- README.rst | 2 +- tests/test_example.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a545986..7e52cd6 100644 --- a/README.md +++ b/README.md @@ -282,7 +282,7 @@ class JSONTranslator(object): 'JSON was incorrect or not encoded as ' 'UTF-8.') - def process_response(self, req, resp): + def process_response(self, req, resp, resource): if 'result' not in req.context: return diff --git a/README.rst b/README.rst index f735a60..0bd3a80 100644 --- a/README.rst +++ b/README.rst @@ -302,7 +302,7 @@ Here is a more involved example that demonstrates reading headers and query para 'JSON was incorrect or not encoded as ' 'UTF-8.') - def process_response(self, req, resp): + def process_response(self, req, resp, resource): if 'result' not in req.context: return diff --git a/tests/test_example.py b/tests/test_example.py index 90e1bec..33a05ca 100644 --- a/tests/test_example.py +++ b/tests/test_example.py @@ -114,7 +114,7 @@ class JSONTranslator(object): 'JSON was incorrect or not encoded as ' 'UTF-8.') - def process_response(self, req, resp): + def process_response(self, req, resp, resource): if 'result' not in req.context: return