Did I find the right examples for you? yes no      Crawl my project      Python Jobs

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

src/s/u/suds-jurko-0.6/tests/test_request_construction.py   suds-jurko(Download)
def test_bare_input_restriction_types():
    client_unnamed = tests.client_from_wsdl(tests.wsdl_input("""\
      <xsd:element name="Elemento">
        <xsd:simpleType>
          <xsd:restriction base="xsd:string">
      </xsd:element>""", "Elemento"))
 
    client_named = tests.client_from_wsdl(tests.wsdl_input("""\
      <xsd:simpleType name="MyType">
        <xsd:restriction base="xsd:string">
def test_document_literal_request_for_single_element_input(xsd,
        external_element_name, args, request_body):
    wsdl = tests.wsdl_input(xsd, external_element_name)
    client = tests.client_from_wsdl(wsdl, nosend=True, prettyxml=True)
 
def test_disabling_automated_simple_interface_unwrapping():
    client = tests.client_from_wsdl(tests.wsdl_input("""\
      <xsd:element name="Wrapper">
        <xsd:complexType>
          <xsd:sequence>
 
    """
    client = tests.client_from_wsdl(tests.wsdl_input("""\
      <xsd:complexType name="Freakazoid">
        <xsd:sequence>

src/s/u/suds-jurko-0.6/tests/test_input_parameters.py   suds-jurko(Download)
        assert not hasattr(self, "service")
        wsdl = tests.wsdl_input(input, "Wrapper", **kwargs)
        client = tests.client_from_wsdl(wsdl, nosend=True)
        self.service = client.service
 
  </wsdl:service>
</wsdl:definitions>""" % (part_name,))
    client = tests.client_from_wsdl(wsdl, nosend=True)
 
    # Collect references to required WSDL model content.
    input_schema = sequence_choice_with_element_and_two_element_sequence.xsd
    wsdl = _unwrappable_wsdl(part_name, input_schema)
    client = tests.client_from_wsdl(wsdl, nosend=True, unwrap=False)
 
    # Collect references to required WSDL model content.
</wsdl:definitions>""")
    wsdl = suds.byte_str("".join(wsdl))
    client = tests.client_from_wsdl(wsdl, nosend=True)
 
    # Collect references to required WSDL model content.
def test_unwrapped_parameter(xsd_type):
    """Test recognizing unwrapped web service operation input structures."""
    input_schema = sequence_choice_with_element_and_two_element_sequence.xsd
    wsdl = _unwrappable_wsdl("part_name", input_schema)
    client = tests.client_from_wsdl(wsdl, nosend=True)

src/s/u/suds-jurko-0.6/tests/test_argument_parser.py   suds-jurko(Download)
</wsdl:definitions>
""" % (binding_style,))
    client = tests.client_from_wsdl(wsdl, nosend=True, prettyxml=True)
    pytest.raises(MyException, client.service.f)
    pytest.raises(MyException, client.service.f, "x")

src/s/u/suds-jurko-0.6/tests/test_reply_handling.py   suds-jurko(Download)
def test_ACCEPTED_and_NO_CONTENT_status_reported_as_None_with_faults():
    client = tests.client_from_wsdl(_wsdl__simple, faults=True)
    f = lambda r, s : client.service.f(__inject={"reply":suds.byte_str(r),
        "status":s})
    assert f("", None) is None
def test_ACCEPTED_and_NO_CONTENT_status_reported_as_None_without_faults():
    client = tests.client_from_wsdl(_wsdl__simple, faults=False)
    f = lambda r, s : client.service.f(__inject={"reply":suds.byte_str(r),
        "status":s})
    assert f("", None) is not None
def test_badly_formed_reply_XML():
    for faults in (True, False):
        client = tests.client_from_wsdl(_wsdl__simple, faults=faults)
        pytest.raises(xml.sax.SAXParseException, client.service.f,
            __inject={"reply":suds.byte_str("bad food")})
def test_restriction_data_types():
    client_unnamed = tests.client_from_wsdl(tests.wsdl_output("""\
      <xsd:element name="Elemento">
        <xsd:simpleType>
          <xsd:restriction base="xsd:int">
      </xsd:element>""", "Elemento"))
 
    client_named = tests.client_from_wsdl(tests.wsdl_output("""\
      <xsd:simpleType name="MyType">
        <xsd:restriction base="xsd:int">

src/s/u/suds-jurko-0.6/tests/test_suds.py   suds-jurko(Download)
 
    """
    client = lambda x, y : tests.client_from_wsdl(tests.wsdl_input(x, y))
 
    client_simple_short = client("""\
def test_converting_client_to_string_must_not_raise_an_exception():
    client = tests.client_from_wsdl(suds.byte_str(
        "<?xml version='1.0' encoding='UTF-8'?><root />"))
    str(client)
 
 
def test_converting_metadata_to_string():
    client = tests.client_from_wsdl(suds.byte_str("""\
def test_empty_valid_wsdl():
    client = tests.client_from_wsdl(suds.byte_str(
        "<?xml version='1.0' encoding='UTF-8'?><root />"))
    assert not client.wsdl.services, "No service definitions must be read "  \
        "from an empty WSDL."
 
 
def test_enumeration_type_string_should_contain_its_value():
    client = tests.client_from_wsdl(suds.byte_str("""\