Make tests work with the latest updates.
This commit is contained in:
@@ -97,15 +97,16 @@ def test_status_from_exception():
|
|||||||
|
|
||||||
|
|
||||||
def test_status_from_tuple():
|
def test_status_from_tuple():
|
||||||
stat = utils.error_status_factory((samlp.STATUS_UNKNOWN_PRINCIPAL, 'Error resolving principal'))
|
stat = utils.error_status_factory((samlp.STATUS_UNKNOWN_PRINCIPAL,
|
||||||
|
'Error resolving principal'))
|
||||||
status_text = "%s" % stat
|
status_text = "%s" % stat
|
||||||
assert status_text == ERROR_STATUS
|
assert status_text in (ERROR_STATUS_NO_HEADER, ERROR_STATUS)
|
||||||
|
|
||||||
|
|
||||||
def test_status_from_tuple_empty_message():
|
def test_status_from_tuple_empty_message():
|
||||||
stat = utils.error_status_factory((samlp.STATUS_UNKNOWN_PRINCIPAL, None))
|
stat = utils.error_status_factory((samlp.STATUS_UNKNOWN_PRINCIPAL, None))
|
||||||
status_text = "%s" % stat
|
status_text = "%s" % stat
|
||||||
assert status_text == ERROR_STATUS_EMPTY
|
assert status_text == ERROR_STATUS_NO_HEADER_EMPTY
|
||||||
|
|
||||||
|
|
||||||
def test_attribute_sn():
|
def test_attribute_sn():
|
||||||
|
@@ -125,7 +125,7 @@ class TestAuthnResponse:
|
|||||||
assert len(authn_info) == 1
|
assert len(authn_info) == 1
|
||||||
assert authn_info[0][0] == INTERNETPROTOCOLPASSWORD
|
assert authn_info[0][0] == INTERNETPROTOCOLPASSWORD
|
||||||
assert authn_info[0][1] == ["http://www.example.com/login"]
|
assert authn_info[0][1] == ["http://www.example.com/login"]
|
||||||
now = datetime.now()
|
now = datetime.utcnow()
|
||||||
dt = parser.parse(authn_info[0][2])
|
dt = parser.parse(authn_info[0][2])
|
||||||
assert now.year == dt.year and now.month == dt.month and now.day == dt.day
|
assert now.year == dt.year and now.month == dt.month and now.day == dt.day
|
||||||
session_info = self.ar.session_info()
|
session_info = self.ar.session_info()
|
||||||
|
Reference in New Issue
Block a user