diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fakeIDP.py | 11 | ||||
-rw-r--r-- | tests/test_51_client.py | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/tests/fakeIDP.py b/tests/fakeIDP.py index 7aec9590..c2bd5612 100644 --- a/tests/fakeIDP.py +++ b/tests/fakeIDP.py @@ -43,8 +43,8 @@ def unpack_form(_str, ver="SAMLRequest"): class DummyResponse(object): - def __init__(self, code, data, headers=None): - self.status_code = code + def __init__(self, status, data, headers=None): + self.status_code = status self.text = data self.headers = headers or [] self.content = data @@ -130,8 +130,7 @@ class FakeIDP(Server): _dict = pack.factory(_binding, response, resp_args["destination"], relay_state, "SAMLResponse") - _dict.pop('status') - return DummyResponse(200, **_dict) + return DummyResponse(**_dict) def attribute_query_endpoint(self, xml_str, binding): if binding == BINDING_SOAP: @@ -161,7 +160,7 @@ class FakeIDP(Server): else: # Just POST response = "%s" % attr_resp - return DummyResponse(200, response) + return DummyResponse(status=200, data=response) def logout_endpoint(self, xml_str, binding): if binding == BINDING_SOAP: @@ -186,4 +185,4 @@ class FakeIDP(Server): else: # Just POST response = "%s" % _resp - return DummyResponse(200, response) + return DummyResponse(status=200, data=response) diff --git a/tests/test_51_client.py b/tests/test_51_client.py index 86340cb7..d30a8746 100644 --- a/tests/test_51_client.py +++ b/tests/test_51_client.py @@ -3249,7 +3249,6 @@ class TestClientWithDummy(): # Here I fake what the client will do # create the form post - http_args.pop('status') http_args["data"] = parse.urlencode(_dic) http_args["method"] = "POST" http_args["dummy"] = _dic["SAMLRequest"] @@ -3286,7 +3285,6 @@ class TestClientWithDummy(): # Here I fake what the client will do # create the form post - http_args.pop('status') http_args["data"] = parse.urlencode(_dic) http_args["method"] = "POST" http_args["dummy"] = _dic["SAMLRequest"] |