From 0ffe3d430d23a5c4e4b496ba5ead3b23e17f50c9 Mon Sep 17 00:00:00 2001 From: jMyles Date: Tue, 5 Feb 2019 16:54:26 -0700 Subject: [PATCH] Cleaning params to fit test client. --- nucypher/utilities/sandbox/middleware.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nucypher/utilities/sandbox/middleware.py b/nucypher/utilities/sandbox/middleware.py index 0ea72338c..c7b97ede0 100644 --- a/nucypher/utilities/sandbox/middleware.py +++ b/nucypher/utilities/sandbox/middleware.py @@ -65,9 +65,13 @@ class _TestMiddlewareClient(NucypherMiddlewareClient): def invoke_method(self, method, url, *args, **kwargs): cert_location = kwargs.pop("verify") # TODO: Is this something that can be meaningfully tested? kwargs.pop("timeout", None) # Just get rid of timeout; not needed for the test client. + self.clean_params(kwargs) response = method(url, *args, **kwargs) return response + def clean_params(self, request_kwargs): + request_kwargs["query_string"] = request_kwargs.pop("params", {}) + class MockRestMiddleware(RestMiddleware): _ursulas = None