Make tests work with the latest updates.

This commit is contained in:
Roland Hedberg
2015-11-02 10:21:56 -08:00
parent d94e10df8a
commit b40dfabc44
2 changed files with 5 additions and 4 deletions

View File

@@ -97,15 +97,16 @@ def test_status_from_exception():
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
assert status_text == ERROR_STATUS
assert status_text in (ERROR_STATUS_NO_HEADER, ERROR_STATUS)
def test_status_from_tuple_empty_message():
stat = utils.error_status_factory((samlp.STATUS_UNKNOWN_PRINCIPAL, None))
status_text = "%s" % stat
assert status_text == ERROR_STATUS_EMPTY
assert status_text == ERROR_STATUS_NO_HEADER_EMPTY
def test_attribute_sn():

View File

@@ -125,7 +125,7 @@ class TestAuthnResponse:
assert len(authn_info) == 1
assert authn_info[0][0] == INTERNETPROTOCOLPASSWORD
assert authn_info[0][1] == ["http://www.example.com/login"]
now = datetime.now()
now = datetime.utcnow()
dt = parser.parse(authn_info[0][2])
assert now.year == dt.year and now.month == dt.month and now.day == dt.day
session_info = self.ar.session_info()