summaryrefslogtreecommitdiff
path: root/tests/test_30_mdstore_old.py
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2020-09-29 12:27:22 +0300
committerIvan Kanakarakis <ivan.kanak@gmail.com>2020-10-28 00:01:45 +0200
commit59913a155ce06c6fe4e43ea1b15586e3d59bafb3 (patch)
tree8accb74f2350925b0593a806c481b767bd432203 /tests/test_30_mdstore_old.py
parent524b70d3ef4523b40b999ee2cd0008f41a31c437 (diff)
downloadpysaml2-59913a155ce06c6fe4e43ea1b15586e3d59bafb3.tar.gz
Return the ResponseLocation before falling back to Locationfeature-logout-response-location
ResponseLocation [Optional] Optionally specifies a different location to which response messages sent as part of the protocol or profile should be sent. The allowable syntax of this URI depends on the protocol binding. The ResponseLocation attribute is used to enable different endpoints to be specified for receiving request and response messages associated with a protocol or profile, not as a means of load-balancing or redundancy (multiple elements of this type can be included for this purpose). When a role contains an element of this type pertaining to a protocol or profile for which only a single type of message (request or response) is applicable, then the ResponseLocation attribute is unused. [E41]If the ResponseLocation attribute is omitted, any response messages associated with a protocol or profile may be assumed to be handled at the URI indicated by the Location attribute. ArtifactResolutionService, SingleSignOnService and NameIDMappingService MUST omit the ResponseLocation attribute. This is enforced here, but metadata with such service declarations and such attributes should not have been part of the metadata store in the first place. Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
Diffstat (limited to 'tests/test_30_mdstore_old.py')
-rw-r--r--tests/test_30_mdstore_old.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/test_30_mdstore_old.py b/tests/test_30_mdstore_old.py
index 7ceb6653..d9f400ed 100644
--- a/tests/test_30_mdstore_old.py
+++ b/tests/test_30_mdstore_old.py
@@ -6,7 +6,7 @@ import os
from unittest.mock import patch
from saml2.mdstore import MetadataStore, MetaDataMDX
-from saml2.mdstore import destinations
+from saml2.mdstore import locations
from saml2.mdstore import name
from saml2 import md
@@ -145,8 +145,9 @@ def test_swami_1():
assert idps.keys()
idpsso = mds.single_sign_on_service(UMU_IDP)
assert len(idpsso) == 1
- assert destinations(idpsso) == [
- 'https://idp.umu.se/saml2/idp/SSOService.php']
+ assert list(locations(idpsso)) == [
+ 'https://idp.umu.se/saml2/idp/SSOService.php'
+ ]
_name = name(mds[UMU_IDP])
assert _name == u'UmeƄ University (SAML2)'
@@ -187,8 +188,9 @@ def test_incommon_1():
idpsso = mds.single_sign_on_service('urn:mace:incommon:alaska.edu')
assert len(idpsso) == 1
print(idpsso)
- assert destinations(idpsso) == [
- 'https://idp.alaska.edu/idp/profile/SAML2/Redirect/SSO']
+ assert list(locations(idpsso)) == [
+ 'https://idp.alaska.edu/idp/profile/SAML2/Redirect/SSO'
+ ]
sps = mds.with_descriptor("spsso")
@@ -247,8 +249,9 @@ def test_switch_1():
'https://aai-demo-idp.switch.ch/idp/shibboleth')
assert len(idpsso) == 1
print(idpsso)
- assert destinations(idpsso) == [
- 'https://aai-demo-idp.switch.ch/idp/profile/SAML2/Redirect/SSO']
+ assert list(locations(idpsso)) == [
+ 'https://aai-demo-idp.switch.ch/idp/profile/SAML2/Redirect/SSO'
+ ]
assert len(idps) > 30
aas = mds.with_descriptor("attribute_authority")
print(aas.keys())