Did I find the right examples for you? yes no

All Samples(38)  |  Call(38)  |  Derive(0)  |  Import(0)

src/t/x/txAWS-0.2.3/txaws/tests/test_wsdl.py   txAWS(Download)
        """
        schema = NodeSchema("foo", [LeafSchema("bar")])
        root = etree.fromstring("<egg><bar>spam</bar></egg>")
        error = self.assertRaises(WSDLParseError, schema.create, root)
        self.assertEqual("Expected response with tag 'foo', but got "
        """
        schema = NodeSchema("foo", [LeafSchema("bar")])
        root = etree.fromstring("<foo><bar>egg</bar></foo>")
        foo = schema.create(root)
        self.assertEqual("egg", foo.bar)
        """
        schema = NodeSchema("foo", [LeafSchema("bar"), LeafSchema("egg")])
        root = etree.fromstring("<foo><bar>spam1</bar><egg>spam2</egg></foo>")
        foo = schema.create(root)
        self.assertEqual("spam1", foo.bar)
        """
        schema = NodeSchema("foo", [LeafSchema("bar")])
        root = etree.fromstring("<foo xmlns=\"spam\"><bar>egg</bar></foo>")
        foo = schema.create(root)
        self.assertEqual("egg", foo.bar)
        """
        schema = NodeSchema("foo", [LeafSchema("bar")])
        root = etree.fromstring("<foo><bar>egg</bar><spam>boom</spam></foo>")
        foo = schema.create(root)
        error = self.assertRaises(WSDLParseError, getattr, foo, "spam")