Fixed some errors in tests.py
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import copy
|
import copy
|
||||||
from saml2 import samlp, SamlBase
|
from saml2 import samlp
|
||||||
from saml2 import NAMEID_FORMAT_EMAILADDRESS
|
from saml2 import NAMEID_FORMAT_EMAILADDRESS
|
||||||
from saml2 import BINDING_HTTP_REDIRECT
|
from saml2 import BINDING_HTTP_REDIRECT
|
||||||
from saml2 import BINDING_HTTP_POST
|
from saml2 import BINDING_HTTP_POST
|
||||||
@@ -36,10 +36,10 @@ class TimeRestriction(ConditionAbstractType_):
|
|||||||
|
|
||||||
c_tag = 'TimeRestriction'
|
c_tag = 'TimeRestriction'
|
||||||
c_namespace = "urn:mace:umu.se:sso"
|
c_namespace = "urn:mace:umu.se:sso"
|
||||||
c_children = ConditionAbstractType_.c_children.copy()
|
c_children = copy.copy(ConditionAbstractType_.c_children)
|
||||||
c_attributes = ConditionAbstractType_.c_attributes.copy()
|
c_attributes = copy.copy(ConditionAbstractType_.c_attributes)
|
||||||
c_child_order = ConditionAbstractType_.c_child_order[:]
|
c_child_order = ConditionAbstractType_.c_child_order[:]
|
||||||
c_cardinality = ConditionAbstractType_.c_cardinality.copy()
|
c_cardinality = copy.copy(ConditionAbstractType_.c_cardinality)
|
||||||
c_attributes['StartTime'] = ('start_time', 'time', False)
|
c_attributes['StartTime'] = ('start_time', 'time', False)
|
||||||
c_attributes['EndTime'] = ('end_time', 'time', False)
|
c_attributes['EndTime'] = ('end_time', 'time', False)
|
||||||
|
|
||||||
@@ -199,13 +199,6 @@ class AuthnResponse_missing_Recipient(AuthnResponse):
|
|||||||
return message
|
return message
|
||||||
|
|
||||||
|
|
||||||
class AuthnResponse_missing_Recipient(AuthnResponse):
|
|
||||||
def pre_processing(self, message, **kwargs):
|
|
||||||
_confirmation = message.assertion.subject.subject_confirmation
|
|
||||||
_confirmation[0].subject_confirmation_data.recipient = None
|
|
||||||
return message
|
|
||||||
|
|
||||||
|
|
||||||
class AuthnResponse_broken_destination(AuthnResponse):
|
class AuthnResponse_broken_destination(AuthnResponse):
|
||||||
def pre_processing(self, message, **kwargs):
|
def pre_processing(self, message, **kwargs):
|
||||||
message.destination = "NotAUrl"
|
message.destination = "NotAUrl"
|
||||||
|
|||||||
Reference in New Issue
Block a user