Example #1
0
    def test_soap_body(self):
        """ https://github.com/zatosource/zato/issues/475 (Body ignored in string-based outgoing SOAP connections)
        """
        config = self._get_config()
        config['transport'] = URL_TYPE.SOAP

        requests_module = _FakeRequestsModule()
        wrapper = HTTPSOAPWrapper(config, requests_module)

        body_text = rand_string()

        wrapper.post(rand_int(), body_text)

        data = etree.fromstring(wrapper.requests_module.session_obj.request_kwargs['data'])
        body = data.xpath('//*[local-name() = "Body"]')[0]
        self.assertEquals(body.text, body_text)
Example #2
0
    def test_soap_body(self):
        """ https://github.com/zatosource/zato/issues/475 (Body ignored in string-based outgoing SOAP connections)
        """
        config = self._get_config()
        config['transport'] = URL_TYPE.SOAP

        requests_module = _FakeRequestsModule()
        wrapper = HTTPSOAPWrapper(config, requests_module)

        body_text = rand_string()

        wrapper.post(rand_int(), body_text)

        data = etree.fromstring(wrapper.requests_module.session_obj.request_kwargs['data'])
        body = data.xpath('//*[local-name() = "Body"]')[0]
        self.assertEquals(body.text, body_text)