コード例 #1
0
ファイル: test_xmlutil.py プロジェクト: musabaloyi/vumi
 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'))
コード例 #2
0
ファイル: test_xmlutil.py プロジェクト: AndrewCvekl/vumi
 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'))
コード例 #3
0
ファイル: server.py プロジェクト: musabaloyi/vumi
    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')
コード例 #4
0
ファイル: test_xmlutil.py プロジェクト: musabaloyi/vumi
 def test_local(self):
     """
     `split_qualified` splits a local XML name into `None` and the tag name.
     """
     self.assertEqual((None, 'tag'), split_qualified('tag'))
コード例 #5
0
ファイル: test_xmlutil.py プロジェクト: AndrewCvekl/vumi
 def test_local(self):
     """
     `split_qualified` splits a local XML name into `None` and the tag name.
     """
     self.assertEqual((None, 'tag'), split_qualified('tag'))