def test_prepare_soap_header(): """Check that the SOAP header is correctly wrapped.""" s = SoapMessage('endpoint', 'method') h = s.prepare_soap_header('<a><b></b></a>') assert h == "<s:Header><a><b></b></a></s:Header>" s = SoapMessage('endpoint', 'method', http_headers={ 'test1': 'one', 'test2': 'two'}) h = s.prepare_soap_header(None) assert h == ''
def test_prepare_soap_header(): """Check that the SOAP header is correctly wrapped.""" s = SoapMessage("endpoint", "method") h = s.prepare_soap_header("<a><b></b></a>") assert h == "<s:Header><a><b></b></a></s:Header>" s = SoapMessage("endpoint", "method", http_headers={ "test1": "one", "test2": "two" }) h = s.prepare_soap_header(None) assert h == ""