Beispiel #1
0
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 == ""
Beispiel #2
0
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 == ""
Beispiel #3
0
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 == ''
Beispiel #4
0
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 == ''