def test_qualified(self): """ `split_qualified` splits a qualified XML name into a URI and the tag name. """ self.assertEqual(('http://example.com', 'tag'), split_qualified('{http://example.com}tag'))
def test_qualified(self): """ `split_qualified` splits a qualified XML name into a URI and the tag name. """ self.assertEqual( ('http://example.com', 'tag'), split_qualified('{http://example.com}tag'))
def process(self, request, body, header=None): """ Process a SOAP request. """ for child in body.getchildren(): # Since there is no SOAPAction header, and these requests are not # made to different endpoints, the only way to handle these is to # switch on the root element's name. Yuck. localname = split_qualified(child.tag)[1] meth = getattr(self, 'process_' + localname, self.process_unknown) return meth(child, header, localname) raise SoapFault(u'soapenv:Client', u'No actionable items')
def test_local(self): """ `split_qualified` splits a local XML name into `None` and the tag name. """ self.assertEqual((None, 'tag'), split_qualified('tag'))
def test_local(self): """ `split_qualified` splits a local XML name into `None` and the tag name. """ self.assertEqual((None, 'tag'), split_qualified('tag'))