-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5dcd630
commit 5154e7d
Showing
1 changed file
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,7 +109,23 @@ def test_proxy_authz_no_aup(self): | |
self.assertEqual(res["status"]["result"], "interrupt") | ||
|
||
network_service = Service.query.filter(Service.entity_id == service_network_entity_id).one() | ||
parameters = urlencode({"service_id": network_service.uuid4, "service_name": network_service.name}) | ||
parameters = urlencode({"service_id": network_service.uuid4, "service_name": network_service.name, "status": 99}) | ||
self.assertEqual(f"{self.app.app_config.base_url}/service-aup?{parameters}", res["status"]["redirect_url"], ) | ||
|
||
def test_proxy_authz_free_ride(self): | ||
network_service = Service.query.filter(Service.entity_id == service_network_entity_id).one() | ||
network_service.non_member_users_access_allowed = True | ||
self.save_entity(network_service) | ||
|
||
# user unknown is SBS | ||
res = self.post("/api/users/proxy_authz", response_status_code=200, | ||
body={"user_id": "urn:gandalf", "service_id": service_network_entity_id, | ||
"issuer_id": "issuer.com", "uid": "gandalf", "homeorganization": "lothlorien.middleearth", | ||
"user_email": "[email protected]"}) | ||
self.assertEqual(res["status"]["result"], "interrupt") | ||
|
||
network_service = Service.query.filter(Service.entity_id == service_network_entity_id).one() | ||
parameters = urlencode({"service_id": network_service.uuid4, "service_name": network_service.name, "status": 97}) | ||
self.assertEqual(f"{self.app.app_config.base_url}/service-aup?{parameters}", res["status"]["redirect_url"], ) | ||
|
||
def test_proxy_authz_no_user(self): | ||
|