@@ -132,11 +132,12 @@ def test_full_flow(self, context, idp_conf, sp_conf):
132
132
disco_resp = parse_qs (urlparse (resp .message ).query )
133
133
info = parse_qs (urlparse (disco_resp ["return" ][0 ]).query )
134
134
info ["entityID" ] = idp_conf ["entityid" ]
135
- request_context = Context ()
135
+ request_context = context
136
136
request_context .request = info
137
137
request_context .state = context .state
138
138
139
139
# pass discovery response to backend and check that it redirects to the selected IdP
140
+ context .state ["SATOSA_BASE" ] = {"requester" : "the-service-identifier" }
140
141
resp = self .samlbackend .disco_response (request_context )
141
142
assert_redirect_to_idp (resp , idp_conf )
142
143
@@ -155,7 +156,6 @@ def test_full_flow(self, context, idp_conf, sp_conf):
155
156
# pass auth response to backend and verify behavior
156
157
self .samlbackend .authn_response (response_context , response_binding )
157
158
context , internal_resp = self .samlbackend .auth_callback_func .call_args [0 ]
158
- assert self .samlbackend .name not in context .state
159
159
assert context .state [test_state_key ] == "my_state"
160
160
assert_authn_response (internal_resp )
161
161
@@ -254,7 +254,6 @@ def test_authn_response(self, context, idp_conf, sp_conf):
254
254
255
255
context , internal_resp = self .samlbackend .auth_callback_func .call_args [0 ]
256
256
assert_authn_response (internal_resp )
257
- assert self .samlbackend .name not in context .state
258
257
259
258
@pytest .mark .skipif (
260
259
saml2 .__version__ < '4.6.1' ,
@@ -290,7 +289,6 @@ def test_authn_response_no_name_id(self, context, idp_conf, sp_conf):
290
289
291
290
context , internal_resp = backend .auth_callback_func .call_args [0 ]
292
291
assert_authn_response (internal_resp )
293
- assert backend .name not in context .state
294
292
295
293
def test_authn_response_with_encrypted_assertion (self , sp_conf , context ):
296
294
with open (os .path .join (
0 commit comments