Skip to content

Commit b40dfab

Browse files
author
Roland Hedberg
committed
Make tests work with the latest updates.
1 parent d94e10d commit b40dfab

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/test_12_s_utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,16 @@ def test_status_from_exception():
9797

9898

9999
def test_status_from_tuple():
100-
stat = utils.error_status_factory((samlp.STATUS_UNKNOWN_PRINCIPAL, 'Error resolving principal'))
100+
stat = utils.error_status_factory((samlp.STATUS_UNKNOWN_PRINCIPAL,
101+
'Error resolving principal'))
101102
status_text = "%s" % stat
102-
assert status_text == ERROR_STATUS
103+
assert status_text in (ERROR_STATUS_NO_HEADER, ERROR_STATUS)
103104

104105

105106
def test_status_from_tuple_empty_message():
106107
stat = utils.error_status_factory((samlp.STATUS_UNKNOWN_PRINCIPAL, None))
107108
status_text = "%s" % stat
108-
assert status_text == ERROR_STATUS_EMPTY
109+
assert status_text == ERROR_STATUS_NO_HEADER_EMPTY
109110

110111

111112
def test_attribute_sn():

tests/test_44_authnresp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def test_verify_w_authn(self):
125125
assert len(authn_info) == 1
126126
assert authn_info[0][0] == INTERNETPROTOCOLPASSWORD
127127
assert authn_info[0][1] == ["http://www.example.com/login"]
128-
now = datetime.now()
128+
now = datetime.utcnow()
129129
dt = parser.parse(authn_info[0][2])
130130
assert now.year == dt.year and now.month == dt.month and now.day == dt.day
131131
session_info = self.ar.session_info()

0 commit comments

Comments
 (0)