From c8581cce2d9cbc2004e0183bad22d01e039b890a Mon Sep 17 00:00:00 2001 From: Roland Hedberg Date: Thu, 9 Dec 2010 10:51:30 +0100 Subject: [PATCH] Remove dependency on string representation --- tests/test_43_soap.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/test_43_soap.py b/tests/test_43_soap.py index a133913..f11c9b1 100755 --- a/tests/test_43_soap.py +++ b/tests/test_43_soap.py @@ -46,15 +46,17 @@ def test_parse_soap_envelope(): def test_make_soap_envelope(): envelope = ElementTree.Element('') envelope.tag = '{%s}Envelope' % NAMESPACE - body = ElementTree.Element('') body.tag = '{%s}Body' % NAMESPACE - - envelope.append(body) - + envelope.append(body) request = samlp.AuthnRequest() request.become_child_element_of(body) - - string = ElementTree.tostring(envelope, encoding="UTF-8") - result = """\n""" - assert string == result + + assert envelope.tag == '{%s}Envelope' % NAMESPACE + assert len(envelope) == 1 + body = envelope[0] + assert body.tag == '{%s}Body' % NAMESPACE + assert len(body) == 1 + saml_part = body[0] + assert saml_part.tag == '{%s}AuthnRequest' % SAMLP_NAMESPACE + \ No newline at end of file