Exemplo n.º 1
0
def test_choice_sequences_no_match():
    fields = [
        ('_choice_1',
         xsd.Choice([
             xsd.Sequence([
                 xsd.Element('item_1', xsd.String()),
                 xsd.Element('item_2', xsd.String())
             ]),
             xsd.Sequence([
                 xsd.Element('item_3', xsd.String()),
                 xsd.Element('item_4', xsd.String())
             ]),
         ])),
    ]
    args = tuple([])
    kwargs = {'item_1': 'value-1', 'item_3': 'value-3'}

    try:
        valueobjects._process_signature(fields, args, kwargs)
    except TypeError as exc:
        assert six.text_type(exc) == (
            "No complete xsd:Choice '_choice_1'.\n" +
            "The signature is: _choice_1: {item_1: xsd:string, item_2: xsd:string} "
            + "| {item_3: xsd:string, item_4: xsd:string}")
    else:
        assert False, "TypeError not raised"
Exemplo n.º 2
0
def test_simple_args_too_few():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Element('item_1', xsd.String()),
            xsd.Element('item_2', xsd.String())
        ]))
    args = tuple(['value-1'])
    kwargs = {}
    valueobjects._process_signature(xsd_type, args, kwargs)
Exemplo n.º 3
0
def test_simple_args_too_many():
    fields = [('item_1', xsd.Element('item_1', xsd.String())),
              ('item_2', xsd.Element('item_2', xsd.String()))]
    args = tuple(['value-1', 'value-2', 'value-3'])
    kwargs = {}

    try:
        valueobjects._process_signature(fields, args, kwargs)
    except TypeError as exc:
        assert six.text_type(exc) == (
            '__init__() takes at most 2 positional arguments (3 given)')
    else:
        assert False, "TypeError not raised"
Exemplo n.º 4
0
def test_choice_sequences_init_dict():
    fields = [
        ('_choice_1',
         xsd.Choice([
             xsd.Sequence([
                 xsd.Element('item_1', xsd.String()),
                 xsd.Element('item_2', xsd.String())
             ]),
             xsd.Sequence([
                 xsd.Element('item_2', xsd.String()),
                 xsd.Element('item_3', xsd.String()),
             ]),
         ],
                    max_occurs=2)),
    ]
    args = tuple([])
    kwargs = {
        '_choice_1': {
            'item_1': 'value-1',
            'item_2': 'value-2'
        },
    }

    result = valueobjects._process_signature(fields, args, kwargs)
    assert result == {
        '_choice_1': [
            valueobjects.ChoiceItem(0, {
                'item_1': 'value-1',
                'item_2': 'value-2'
            })
        ]
    }
Exemplo n.º 5
0
def test_choice_sequences_optional_elms():
    fields = [
        ('_choice_1',
         xsd.Choice([
             xsd.Sequence([
                 xsd.Element('item_1', xsd.String()),
                 xsd.Element('item_2', xsd.String(), min_occurs=0)
             ]),
             xsd.Sequence([
                 xsd.Element('item_1', xsd.String()),
                 xsd.Element('item_2', xsd.String()),
                 xsd.Element('item_3', xsd.String())
             ]),
         ])),
    ]
    args = tuple([])
    kwargs = {'item_1': 'value-1'}
    result = valueobjects._process_signature(fields, args, kwargs)
    assert result == {
        '_choice_1':
        valueobjects.ChoiceItem(0, {
            'item_1': 'value-1',
            'item_2': None
        })
    }
def test_choice_max_occurs():
    fields = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice(
                [
                    xsd.Element("item_1", xsd.String()),
                    xsd.Element("item_2", xsd.String()),
                ],
                max_occurs=3,
            )
        ]))
    args = tuple([])
    kwargs = {
        "_value_1": [{
            "item_1": "foo"
        }, {
            "item_2": "bar"
        }, {
            "item_1": "bla"
        }]
    }
    result = valueobjects._process_signature(fields, args, kwargs)
    assert result == {
        "_value_1": [{
            "item_1": "foo"
        }, {
            "item_2": "bar"
        }, {
            "item_1": "bla"
        }]
    }
Exemplo n.º 7
0
def test_choice_max_occurs_on_choice():
    fields = [('_choice_1',
               xsd.Choice([
                   xsd.Element('item_1', xsd.String(), max_occurs=2),
                   xsd.Element('item_2', xsd.String())
               ],
                          max_occurs=2))]
    args = tuple([])
    kwargs = {
        '_choice_1': [
            {
                'item_1': ['foo', 'bar']
            },
            {
                'item_2': 'bla'
            },
        ]
    }
    result = valueobjects._process_signature(fields, args, kwargs)
    assert result == {
        '_choice_1': [
            valueobjects.ChoiceItem(0, {'item_1': ['foo', 'bar']}),
            valueobjects.ChoiceItem(1, {'item_2': 'bla'})
        ]
    }
Exemplo n.º 8
0
def test_choice_max_occurs_on_choice():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Element('item_1', xsd.String(), max_occurs=2),
                xsd.Element('item_2', xsd.String())
            ],
                       max_occurs=2)
        ]))
    args = tuple([])
    kwargs = {
        '_value_1': [
            {
                'item_1': ['foo', 'bar']
            },
            {
                'item_2': 'bla'
            },
        ]
    }
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        '_value_1': [{
            'item_1': ['foo', 'bar']
        }, {
            'item_2': 'bla'
        }]
    }
def test_simple_args_too_many():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Element("item_1", xsd.String()),
            xsd.Element("item_2", xsd.String())
        ]))
    args = tuple(["value-1", "value-2", "value-3"])
    kwargs = {}

    try:
        valueobjects._process_signature(xsd_type, args, kwargs)
    except TypeError as exc:
        assert str(exc) == (
            "__init__() takes at most 2 positional arguments (3 given)")
    else:
        assert False, "TypeError not raised"
Exemplo n.º 10
0
def test_choice_max_occurs():
    fields = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Element('item_1', xsd.String()),
                xsd.Element('item_2', xsd.String())
            ],
                       max_occurs=3)
        ]))
    args = tuple([])
    kwargs = {
        '_value_1': [{
            'item_1': 'foo'
        }, {
            'item_2': 'bar'
        }, {
            'item_1': 'bla'
        }]
    }
    result = valueobjects._process_signature(fields, args, kwargs)
    assert result == {
        '_value_1': [
            {
                'item_1': 'foo'
            },
            {
                'item_2': 'bar'
            },
            {
                'item_1': 'bla'
            },
        ]
    }
Exemplo n.º 11
0
def test_choice_sequences_init_dict():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Sequence([
                    xsd.Element('item_1', xsd.String()),
                    xsd.Element('item_2', xsd.String())
                ]),
                xsd.Sequence([
                    xsd.Element('item_2', xsd.String()),
                    xsd.Element('item_3', xsd.String()),
                ]),
            ], max_occurs=2)
        ]),
    )
    args = tuple([])
    kwargs = {
        '_value_1': {'item_1': 'value-1', 'item_2': 'value-2'},
    }

    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        '_value_1': [
            {'item_1': 'value-1', 'item_2': 'value-2'}
        ]
    }
Exemplo n.º 12
0
def test_simple_args_too_many():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Element('item_1', xsd.String()),
            xsd.Element('item_2', xsd.String())
        ]))
    args = tuple(['value-1', 'value-2', 'value-3'])
    kwargs = {}

    try:
        valueobjects._process_signature(xsd_type, args, kwargs)
    except TypeError as exc:
        assert six.text_type(exc) == (
            '__init__() takes at most 2 positional arguments (3 given)')
    else:
        assert False, "TypeError not raised"
Exemplo n.º 13
0
def test_choice_sequences_no_match_last():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Sequence([
                    xsd.Element('item_1', xsd.String()),
                    xsd.Element('item_2', xsd.String())
                ]),
                xsd.Sequence([
                    xsd.Element('item_3', xsd.String()),
                    xsd.Element('item_4', xsd.String())
                ]),
            ])
        ]))
    args = tuple([])
    with pytest.raises(TypeError):
        kwargs = {'item_2': 'value-2', 'item_4': 'value-4'}
        valueobjects._process_signature(xsd_type, args, kwargs)
def test_choice_sequences_no_match_last():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Sequence([
                    xsd.Element("item_1", xsd.String()),
                    xsd.Element("item_2", xsd.String()),
                ]),
                xsd.Sequence([
                    xsd.Element("item_3", xsd.String()),
                    xsd.Element("item_4", xsd.String()),
                ]),
            ])
        ]))
    args = tuple([])
    with pytest.raises(TypeError):
        kwargs = {"item_2": "value-2", "item_4": "value-4"}
        valueobjects._process_signature(xsd_type, args, kwargs)
def test_simple_mixed():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Element("item_1", xsd.String()),
            xsd.Element("item_2", xsd.String())
        ]))
    args = tuple(["value-1"])
    kwargs = {"item_2": "value-2"}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {"item_1": "value-1", "item_2": "value-2"}
Exemplo n.º 16
0
def test_choice_sequences_no_match_last():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Sequence([
                    xsd.Element('item_1', xsd.String()),
                    xsd.Element('item_2', xsd.String())
                ]),
                xsd.Sequence([
                    xsd.Element('item_3', xsd.String()),
                    xsd.Element('item_4', xsd.String())
                ]),
            ])
        ])
    )
    args = tuple([])
    with pytest.raises(TypeError):
        kwargs = {'item_2': 'value-2', 'item_4': 'value-4'}
        valueobjects._process_signature(xsd_type, args, kwargs)
Exemplo n.º 17
0
def test_simple_args():
    fields = [('item_1', xsd.Element('item_1', xsd.String())),
              ('item_2', xsd.Element('item_2', xsd.String()))]
    args = tuple(['value-1', 'value-2'])
    kwargs = {}
    result = valueobjects._process_signature(fields, args, kwargs)
    assert result == {
        'item_1': 'value-1',
        'item_2': 'value-2',
    }
Exemplo n.º 18
0
def test_choice():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Element('item_1', xsd.String()),
                xsd.Element('item_2', xsd.String())
            ])
        ]))
    args = tuple([])
    kwargs = {'item_2': 'value-2'}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {'item_1': None, 'item_2': 'value-2'}
Exemplo n.º 19
0
def test_choice():
    fields = [('_choice_1',
               xsd.Choice([
                   xsd.Element('item_1', xsd.String()),
                   xsd.Element('item_2', xsd.String())
               ]))]
    args = tuple([])
    kwargs = {'item_2': 'value-2'}
    result = valueobjects._process_signature(fields, args, kwargs)
    assert result == {
        '_choice_1': valueobjects.ChoiceItem(1, {'item_2': 'value-2'})
    }
Exemplo n.º 20
0
def test_simple_kwargs():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Element('item_1', xsd.String()),
            xsd.Element('item_2', xsd.String())
        ]))
    args = tuple([])
    kwargs = {'item_1': 'value-1', 'item_2': 'value-2'}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        'item_1': 'value-1',
        'item_2': 'value-2',
    }
def test_choice_sequences_no_match_nested():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Sequence([
                    xsd.Element("item_1", xsd.String()),
                    xsd.Element("item_2", xsd.String()),
                ])
            ])
        ]))
    args = tuple([])
    kwargs = {"item_1": "value-1"}
    value = valueobjects._process_signature(xsd_type, args, kwargs)
    assert value == {"item_1": "value-1", "item_2": None}
Exemplo n.º 22
0
def test_simple_args_attributes_as_kwargs():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Element('item_1', xsd.String()),
            xsd.Element('item_2', xsd.String())
        ]), [xsd.Attribute('attr_1', xsd.String())])
    args = tuple(['value-1', 'value-2'])
    kwargs = {'attr_1': 'bla'}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        'item_1': 'value-1',
        'item_2': 'value-2',
        'attr_1': 'bla',
    }
Exemplo n.º 23
0
def test_choice_sequences_no_match_nested():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Sequence([
                    xsd.Element('item_1', xsd.String()),
                    xsd.Element('item_2', xsd.String())
                ]),
            ])
        ]))
    args = tuple([])
    kwargs = {'item_1': 'value-1'}
    value = valueobjects._process_signature(xsd_type, args, kwargs)
    assert value == {'item_1': 'value-1'}
Exemplo n.º 24
0
def test_choice_sequences_no_match_nested():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Sequence([
                    xsd.Element('item_1', xsd.String()),
                    xsd.Element('item_2', xsd.String())
                ]),
            ])
        ])
    )
    args = tuple([])
    kwargs = {'item_1': 'value-1'}
    value = valueobjects._process_signature(xsd_type, args, kwargs)
    assert value == {'item_1': 'value-1'}
def test_simple_args_attributes_as_kwargs():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Element("item_1", xsd.String()),
            xsd.Element("item_2", xsd.String())
        ]),
        [xsd.Attribute("attr_1", xsd.String())],
    )
    args = tuple(["value-1", "value-2"])
    kwargs = {"attr_1": "bla"}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        "item_1": "value-1",
        "item_2": "value-2",
        "attr_1": "bla"
    }
Exemplo n.º 26
0
def test_simple_args_attributes_as_kwargs():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Element('item_1', xsd.String()),
            xsd.Element('item_2', xsd.String())
        ]),
        [
            xsd.Attribute('attr_1', xsd.String())
        ]
    )
    args = tuple(['value-1', 'value-2'])
    kwargs = {'attr_1': 'bla'}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        'item_1': 'value-1',
        'item_2': 'value-2',
        'attr_1': 'bla',
    }
def test_choice_sequences_max_occur():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice(
                [
                    xsd.Sequence([
                        xsd.Element("item_1", xsd.String()),
                        xsd.Element("item_2", xsd.String()),
                    ]),
                    xsd.Sequence([
                        xsd.Element("item_2", xsd.String()),
                        xsd.Element("item_3", xsd.String()),
                    ]),
                ],
                max_occurs=2,
            )
        ]))
    args = tuple([])
    kwargs = {
        "_value_1": [
            {
                "item_1": "value-1",
                "item_2": "value-2"
            },
            {
                "item_2": "value-2",
                "item_3": "value-3"
            },
        ]
    }

    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        "_value_1": [
            {
                "item_1": "value-1",
                "item_2": "value-2"
            },
            {
                "item_2": "value-2",
                "item_3": "value-3"
            },
        ]
    }
def test_choice_sequences_optional_elms():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Sequence([
                    xsd.Element("item_1", xsd.String()),
                    xsd.Element("item_2", xsd.String(), min_occurs=0),
                ]),
                xsd.Sequence([
                    xsd.Element("item_1", xsd.String()),
                    xsd.Element("item_2", xsd.String()),
                    xsd.Element("item_3", xsd.String()),
                ]),
            ])
        ]))
    args = tuple([])
    kwargs = {"item_1": "value-1"}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {"item_1": "value-1", "item_2": None, "item_3": None}
Exemplo n.º 29
0
def test_choice_sequences_optional_elms():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Sequence([
                    xsd.Element('item_1', xsd.String()),
                    xsd.Element('item_2', xsd.String(), min_occurs=0)
                ]),
                xsd.Sequence([
                    xsd.Element('item_1', xsd.String()),
                    xsd.Element('item_2', xsd.String()),
                    xsd.Element('item_3', xsd.String())
                ]),
            ])
        ]))
    args = tuple([])
    kwargs = {'item_1': 'value-1'}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {'item_1': 'value-1'}
Exemplo n.º 30
0
def test_choice_mixed():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Element('item_1', xsd.String()),
                xsd.Element('item_2', xsd.String()),
            ]),
            xsd.Element('item_2', xsd.String())
        ]))
    expected = '({item_1: xsd:string} | {item_2: xsd:string}), item_2__1: xsd:string'
    assert xsd_type.signature() == expected

    args = tuple([])
    kwargs = {'item_1': 'value-1', 'item_2__1': 'value-2'}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        'item_1': 'value-1',
        'item_2__1': 'value-2',
    }
Exemplo n.º 31
0
def test_choice_mixed():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Element('item_1', xsd.String()),
                xsd.Element('item_2', xsd.String()),
            ]),
            xsd.Element('item_2', xsd.String())
        ])
    )
    expected = '({item_1: xsd:string} | {item_2: xsd:string}), item_2__1: xsd:string'
    assert xsd_type.signature() == expected

    args = tuple([])
    kwargs = {'item_1': 'value-1', 'item_2__1': 'value-2'}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        'item_1': 'value-1',
        'item_2__1': 'value-2',
    }
Exemplo n.º 32
0
def test_choice_max_occurs_simple_interface():
    fields = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Element('item_1', xsd.String()),
                xsd.Element('item_2', xsd.String())
            ], max_occurs=2)
        ])
    )
    args = tuple([])
    kwargs = {
        '_value_1': [{'item_1': 'foo'}, {'item_2': 'bar'}]
    }
    result = valueobjects._process_signature(fields, args, kwargs)
    assert result == {
        '_value_1': [
            {'item_1': 'foo'},
            {'item_2': 'bar'},
        ]
    }
Exemplo n.º 33
0
def test_choice_mixed():
    xsd_type = xsd.ComplexType(xsd.Sequence([
        xsd.Choice([
            xsd.Element('item_1', xsd.String()),
            xsd.Element('item_2', xsd.String()),
        ]),
        xsd.Element('item_2', xsd.String())
    ]),
                               qname=QName('http://tests.python-zeep.org',
                                           'container'))
    expected = '{http://tests.python-zeep.org}container(({item_1: xsd:string} | {item_2: xsd:string}), item_2__1: xsd:string)'
    assert xsd_type.signature() == expected

    args = tuple([])
    kwargs = {'item_1': 'value-1', 'item_2__1': 'value-2'}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        'item_1': 'value-1',
        'item_2': None,
        'item_2__1': 'value-2',
    }
def test_choice_max_occurs_on_choice():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice(
                [
                    xsd.Element("item_1", xsd.String(), max_occurs=2),
                    xsd.Element("item_2", xsd.String()),
                ],
                max_occurs=2,
            )
        ]))
    args = tuple([])
    kwargs = {"_value_1": [{"item_1": ["foo", "bar"]}, {"item_2": "bla"}]}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        "_value_1": [{
            "item_1": ["foo", "bar"]
        }, {
            "item_2": "bla"
        }]
    }
Exemplo n.º 35
0
def test_choice_sequences_optional_elms():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Sequence([
                    xsd.Element('item_1', xsd.String()),
                    xsd.Element('item_2', xsd.String(), min_occurs=0)
                ]),
                xsd.Sequence([
                    xsd.Element('item_1', xsd.String()),
                    xsd.Element('item_2', xsd.String()),
                    xsd.Element('item_3', xsd.String())
                ]),
            ])
        ])
    )
    args = tuple([])
    kwargs = {'item_1': 'value-1'}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        'item_1': 'value-1'
    }
def test_choice_mixed():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Element("item_1", xsd.String()),
                xsd.Element("item_2", xsd.String()),
            ]),
            xsd.Element("item_2", xsd.String()),
        ]),
        qname=QName("http://tests.python-zeep.org", "container"),
    )
    expected = "{http://tests.python-zeep.org}container(({item_1: xsd:string} | {item_2: xsd:string}), item_2__1: xsd:string)"
    assert xsd_type.signature() == expected

    args = tuple([])
    kwargs = {"item_1": "value-1", "item_2__1": "value-2"}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        "item_1": "value-1",
        "item_2": None,
        "item_2__1": "value-2"
    }
Exemplo n.º 37
0
def test_choice_mixed():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Element('item_1', xsd.String()),
                xsd.Element('item_2', xsd.String()),
            ]),
            xsd.Element('item_2', xsd.String())
        ]),
        qname=QName('http://tests.python-zeep.org', 'container')
    )
    expected = '{http://tests.python-zeep.org}container(({item_1: xsd:string} | {item_2: xsd:string}), item_2__1: xsd:string)'
    assert xsd_type.signature() == expected

    args = tuple([])
    kwargs = {'item_1': 'value-1', 'item_2__1': 'value-2'}
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        'item_1': 'value-1',
        'item_2': None,
        'item_2__1': 'value-2',
    }
Exemplo n.º 38
0
def test_choice_max_occurs_on_choice():
    xsd_type = xsd.ComplexType(
        xsd.Sequence([
            xsd.Choice([
                xsd.Element('item_1', xsd.String(), max_occurs=2),
                xsd.Element('item_2', xsd.String())
            ], max_occurs=2)
        ])
    )
    args = tuple([])
    kwargs = {
        '_value_1': [
            {'item_1': ['foo', 'bar']},
            {'item_2': 'bla'},
        ]
    }
    result = valueobjects._process_signature(xsd_type, args, kwargs)
    assert result == {
        '_value_1': [
            {'item_1': ['foo', 'bar']},
            {'item_2': 'bla'}
        ]
    }
Exemplo n.º 39
0
def test_simple_args_too_few():
    fields = [('item_1', xsd.Element('item_1', xsd.String())),
              ('item_2', xsd.Element('item_2', xsd.String()))]
    args = tuple(['value-1'])
    kwargs = {}
    valueobjects._process_signature(fields, args, kwargs)