File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -309,7 +309,8 @@ def resolve(self):
309
309
def signature (self , schema = None , standalone = True ):
310
310
from zeep .xsd import ComplexType
311
311
312
- if self .type .is_global or (not standalone and self .is_global ):
312
+ if ((self .type .is_global and self .type .qname is not None ) or
313
+ (not standalone and self .is_global )):
313
314
value = self .type .get_prefixed_name (schema )
314
315
else :
315
316
value = self .type .signature (schema , standalone = False )
Original file line number Diff line number Diff line change
1
+ import pytest
1
2
from lxml import etree
2
3
3
4
from tests .utils import load_xml
@@ -289,3 +290,14 @@ def test_schema_recursive_ref():
289
290
290
291
elm = schema .get_element ("ns0:Container" )
291
292
elm .signature (schema )
293
+
294
+
295
+ @pytest .mark .parametrize ('default_type' , xsd .default_types .values ())
296
+ @pytest .mark .parametrize ('standalone' , [True , False ])
297
+ def test_signature_builtin_type (default_type , standalone ):
298
+ builtin_type = xsd .Element (
299
+ etree .QName ("http://tests.python-zeep.org/" , "authentication" ),
300
+ default_type
301
+ )
302
+ signature = builtin_type .signature (standalone = standalone )
303
+ assert isinstance (signature , str )
You can’t perform that action at this time.
0 commit comments