How to use the zeep.xsd.Schema function in zeep

To help you get started, we’ve selected a few zeep examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mvantellingen / python-zeep / tests / test_xsd_attributes.py View on Github external
def test_nested_attribute():
    schema = xsd.Schema(
        load_xml(
            """
        
        
          <element name="container">
            
              
                <element name="item">
                    
                        
                            <element name="x">
                        </element></element></element>
github mvantellingen / python-zeep / tests / test_xsd_indicators_group.py View on Github external
def test_xml_group_methods():
    schema = xsd.Schema(
        load_xml(
            """
        
        

          
            
              blub
            
            
              
              
github mvantellingen / python-zeep / tests / test_xsd_indicators_choice.py View on Github external
def test_parse_check_unexpected():
    schema = xsd.Schema(
        load_xml(
            """
        
        
          
            
              
                
                
              
            
github mvantellingen / python-zeep / tests / test_xsd_attributes.py View on Github external
def test_complex_type_with_attributes():
    schema = xsd.Schema(
        load_xml(
            """
        
        
          
            
              
              
              
            
            
          
          
        
    """
        )
github mvantellingen / python-zeep / tests / test_xsd_indicators_choice.py View on Github external
""".strip()
    )
    schema = xsd.Schema(node)
    container_elm = schema.get_element("ns0:container")

    assert container_elm.type.signature(schema=schema) == (
        "ns0:container(something: xsd:string, ({item_1: xsd:string} | {item_2: xsd:string} | {item_3: xsd:string}))"
    )
    value = container_elm(something="foobar", item_1="item-1")

    expected = """
      
        
          foobar
          item-1
        
      
    """
    node = etree.Element("document")
github mvantellingen / python-zeep / tests / test_wsdl_arrays.py View on Github external
def test_complex_type(transport):
    schema = xsd.Schema(
        load_xml(
            """
    
      

      
        
          
          
        
github mvantellingen / python-zeep / tests / test_xsd_attributes.py View on Github external
def test_attribute_list_type():
    schema = xsd.Schema(
        load_xml(
            """
        
        
          
            
          

          <element name="container">
            
              
                <element name="foo"></element></element>
github mvantellingen / python-zeep / tests / test_xsd_indicators_group.py View on Github external
def test_xml_group_via_ref():
    schema = xsd.Schema(
        load_xml(
            """
        
        

          
            
              
            
          

          
github mvantellingen / python-zeep / tests / test_xsd_attributes.py View on Github external
def test_ref_attribute_qualified():
    schema = xsd.Schema(
        load_xml(
            """
        
        
          
            
              
            
          
          
        
    """
github mvantellingen / python-zeep / tests / test_xsd_parse.py View on Github external
def test_sequence_parse_anytype_nil():
    schema = xsd.Schema(
        load_xml(
            b"""
        
        
          
            
              
                
              
            
          
        
    """