fixed some tests
This commit is contained in:
@@ -114,7 +114,8 @@ TEST_ATTRIBUTE_PROFILE = """<?xml version="1.0" encoding="utf-8"?>
|
||||
"""
|
||||
|
||||
TEST_ORGANIZATION_NAME = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<OrganizationName xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xml:lang="en">
|
||||
<OrganizationName xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
|
||||
ns1:lang="en" xmlns:ns1="http:#www.w3.org/XML/1998/namespace">
|
||||
SIOS Technology, Inc.
|
||||
</OrganizationName>
|
||||
"""
|
||||
@@ -122,13 +123,14 @@ TEST_ORGANIZATION_NAME = """<?xml version="1.0" encoding="utf-8"?>
|
||||
TEST_ORGANIZATION_DISPLAY_NAME = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<OrganizationDisplayName
|
||||
xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
|
||||
xml:lang="en">
|
||||
ns1:lang="en" xmlns:ns1="http:#www.w3.org/XML/1998/namespace">
|
||||
SIOS
|
||||
</OrganizationDisplayName>
|
||||
"""
|
||||
|
||||
TEST_ORGANIZATION_URL = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<OrganizationURL xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xml:lang="ja">
|
||||
<OrganizationURL xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
|
||||
ns1:lang="ja" xmlns:ns1="http:#www.w3.org/XML/1998/namespace">
|
||||
http://www.example.com/
|
||||
</OrganizationURL>
|
||||
"""
|
||||
@@ -138,13 +140,16 @@ TEST_ORGANIZATION = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<Extensions>
|
||||
<hoge xmlns="http://hoge.example.com/">hogehoge</hoge>
|
||||
</Extensions>
|
||||
<OrganizationName xml:lang="en">
|
||||
<OrganizationName
|
||||
ns1:lang="en" xmlns:ns1="http:#www.w3.org/XML/1998/namespace">
|
||||
SIOS Technology, Inc.
|
||||
</OrganizationName>
|
||||
<OrganizationDisplayName xml:lang="en">
|
||||
<OrganizationDisplayName ns1:lang="en"
|
||||
xmlns:ns1="http:#www.w3.org/XML/1998/namespace">
|
||||
SIOS
|
||||
</OrganizationDisplayName>
|
||||
<OrganizationURL xml:lang="ja">
|
||||
<OrganizationURL
|
||||
ns1:lang="ja" xmlns:ns1="http:#www.w3.org/XML/1998/namespace">
|
||||
http://www.example.com/
|
||||
</OrganizationURL>
|
||||
</Organization>
|
||||
@@ -882,13 +887,15 @@ TEST_REQUESTED_ATTRIBUTE = """<?xml version="1.0" encoding="utf-8"?>
|
||||
"""
|
||||
|
||||
TEST_SERVICE_NAME = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<ServiceName xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xml:lang="en">
|
||||
<ServiceName xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
|
||||
ns1:lang="en" xmlns:ns1="http:#www.w3.org/XML/1998/namespace">
|
||||
SIOS mail
|
||||
</ServiceName>
|
||||
"""
|
||||
|
||||
TEST_SERVICE_DESCRIPTION = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<ServiceDescription xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xml:lang="en">
|
||||
<ServiceDescription xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
|
||||
ns1:lang="en" xmlns:ns1="http:#www.w3.org/XML/1998/namespace">
|
||||
SIOS mail service
|
||||
</ServiceDescription>
|
||||
"""
|
||||
|
||||
@@ -81,7 +81,7 @@ TEST_ATTRIBUTE_VALUE = """<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
TEST_ATTRIBUTE = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<Attribute Name="testAttribute"
|
||||
NameFormat="urn:oasis:names:tc:SAML:2.0:attrnam-format:unspecified"
|
||||
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
|
||||
FriendlyName="test attribute"
|
||||
xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
|
||||
<AttributeValue >value1 of test attribute</AttributeValue>
|
||||
@@ -92,13 +92,13 @@ TEST_ATTRIBUTE = """<?xml version="1.0" encoding="utf-8"?>
|
||||
TEST_ATTRIBUTE_STATEMENT = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<AttributeStatement xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
|
||||
<Attribute Name="testAttribute"
|
||||
NameFormat="urn:oasis:names:tc:SAML:2.0:attrnam-format:unspecified"
|
||||
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
|
||||
FriendlyName="test attribute">
|
||||
<AttributeValue >value1 of test attribute</AttributeValue>
|
||||
<AttributeValue >value2 of test attribute</AttributeValue>
|
||||
</Attribute>
|
||||
<Attribute Name="http://www.example.com/testAttribute2"
|
||||
NameFormat="urn:oasis:names:tc:SAML:2.0:attrnam-format:uri"
|
||||
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
|
||||
FriendlyName="test attribute2">
|
||||
<AttributeValue >value1 of test attribute2</AttributeValue>
|
||||
<AttributeValue >value2 of test attribute2</AttributeValue>
|
||||
|
||||
@@ -971,8 +971,10 @@ class TestSPSSODescriptor:
|
||||
self.sp_sso_descriptor.attribute_consuming_service.append(
|
||||
md.AttributeConsumingService())
|
||||
|
||||
print self.sp_sso_descriptor
|
||||
new_sp_sso_descriptor = md.spsso_descriptor_from_string(
|
||||
self.sp_sso_descriptor.to_string())
|
||||
print new_sp_sso_descriptor
|
||||
assert new_sp_sso_descriptor.identifier == "ID"
|
||||
assert new_sp_sso_descriptor.valid_until == "2008-09-14T01:05:02Z"
|
||||
assert new_sp_sso_descriptor.cache_duration == "10:00:00:00"
|
||||
|
||||
Reference in New Issue
Block a user