Skip to content

Commit 603b7c5

Browse files
committed
Allow text representation of samlp.Status without XML declaration in test.
The xml.etree.ElementTree.tostring() method returns text without XML declaration in Python 3. This change amends test in test_12_s_utils to expect the result with or without XML declaration. Signed-off-by: Oleg Girko <[email protected]>
1 parent 933d53f commit 603b7c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_12_s_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_status_from_tuple():
106106
def test_status_from_tuple_empty_message():
107107
stat = utils.error_status_factory((samlp.STATUS_UNKNOWN_PRINCIPAL, None))
108108
status_text = "%s" % stat
109-
assert status_text == ERROR_STATUS_EMPTY
109+
assert status_text in (ERROR_STATUS_EMPTY, ERROR_STATUS_NO_HEADER_EMPTY)
110110

111111

112112
def test_attribute_sn():

0 commit comments

Comments
 (0)