Cleaning params to fit test client.

pull/730/head
jMyles 2019-02-05 16:54:26 -07:00
parent 7f226c04a4
commit 0ffe3d430d
1 changed files with 4 additions and 0 deletions

View File

@ -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