@@ -43,8 +43,8 @@ def unpack_form(_str, ver="SAMLRequest"):
43
43
44
44
45
45
class DummyResponse (object ):
46
- def __init__ (self , code , data , headers = None ):
47
- self .status_code = code
46
+ def __init__ (self , status , data , headers = None ):
47
+ self .status_code = status
48
48
self .text = data
49
49
self .headers = headers or []
50
50
self .content = data
@@ -130,8 +130,7 @@ def authn_request_endpoint(self, req, binding, relay_state):
130
130
_dict = pack .factory (_binding , response ,
131
131
resp_args ["destination" ], relay_state ,
132
132
"SAMLResponse" )
133
- _dict .pop ('status' )
134
- return DummyResponse (200 , ** _dict )
133
+ return DummyResponse (** _dict )
135
134
136
135
def attribute_query_endpoint (self , xml_str , binding ):
137
136
if binding == BINDING_SOAP :
@@ -161,7 +160,7 @@ def attribute_query_endpoint(self, xml_str, binding):
161
160
else : # Just POST
162
161
response = "%s" % attr_resp
163
162
164
- return DummyResponse (200 , response )
163
+ return DummyResponse (status = 200 , data = response )
165
164
166
165
def logout_endpoint (self , xml_str , binding ):
167
166
if binding == BINDING_SOAP :
@@ -186,4 +185,4 @@ def logout_endpoint(self, xml_str, binding):
186
185
else : # Just POST
187
186
response = "%s" % _resp
188
187
189
- return DummyResponse (200 , response )
188
+ return DummyResponse (status = 200 , data = response )
0 commit comments