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