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 <ol@infoserver.lv>
This commit is contained in:
@@ -106,7 +106,7 @@ def test_status_from_tuple():
|
|||||||
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 in (ERROR_STATUS_EMPTY, ERROR_STATUS_NO_HEADER_EMPTY)
|
||||||
|
|
||||||
|
|
||||||
def test_attribute_sn():
|
def test_attribute_sn():
|
||||||
|
Reference in New Issue
Block a user