We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa8a6e0 commit c09bb53Copy full SHA for c09bb53
1 file changed
tests/test_xsd.py
@@ -72,6 +72,24 @@ def test_element_simple_type():
72
assert_nodes_equal(expected, node)
73
74
75
+def test_complex_type():
76
+ custom_type = xsd.ComplexType(
77
+ xsd.Sequence([
78
+ xsd.Element(
79
+ etree.QName('http://tests.python-zeep.org/', 'username'),
80
+ xsd.String()),
81
82
+ etree.QName('http://tests.python-zeep.org/', 'password'),
83
84
+ ])
85
+ )
86
+ obj = custom_type('user', 'pass')
87
+ assert {key: obj[key] for key in obj} == {
88
+ 'username': 'user',
89
+ 'password': 'pass'
90
+ }
91
+
92
93
def test_nil_elements():
94
custom_type = xsd.Element(
95
'{http://tests.python-zeep.org/}container',
0 commit comments