python-zeep
python-zeep copied to clipboard
Added check for nil in ComplexType
parse_xmlelement "
It seems to me that there was a bug, because with the nullable instance in WSDL the wrong result is returned (with allow_nullable = True, it is expected to None, but we get an empty instance) The solution can be such, or it is necessary to call the parent function from AnyType.
Can you add a unittest?
Codecov Report
Merging #753 into master will decrease coverage by
0.06%. The diff coverage is100%.
@@ Coverage Diff @@
## master #753 +/- ##
==========================================
- Coverage 89.32% 89.26% -0.07%
==========================================
Files 65 63 -2
Lines 4845 4678 -167
Branches 850 823 -27
==========================================
- Hits 4328 4176 -152
+ Misses 333 323 -10
+ Partials 184 179 -5
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/zeep/xsd/types/complex.py | 93.77% <100%> (+0.02%) |
:arrow_up: |
| src/zeep/asyncio/__init__.py | 0% <0%> (-100%) |
:arrow_down: |
| src/zeep/exceptions.py | 89.06% <0%> (-3.13%) |
:arrow_down: |
| src/zeep/xsd/elements/element.py | 86.84% <0%> (-3.04%) |
:arrow_down: |
| src/zeep/client.py | 80.48% <0%> (-2.44%) |
:arrow_down: |
| src/zeep/wsse/signature.py | 93.1% <0%> (-1.24%) |
:arrow_down: |
| src/zeep/wsdl/messages/xop.py | 81.25% <0%> (-1.11%) |
:arrow_down: |
| src/zeep/xsd/elements/indicators.py | 93.13% <0%> (-0.54%) |
:arrow_down: |
| src/zeep/transports.py | 72.3% <0%> (-0.42%) |
:arrow_down: |
| src/zeep/tornado/transport.py | 67.94% <0%> (-0.41%) |
:arrow_down: |
| ... and 43 more |
Added test_xml_simple_content_nil_allow_nil if written logic contradicts yours - I wait for suggestions
I had the same issue and it is also described in https://github.com/mvantellingen/python-zeep/issues/823 Was going to submit a fix then realized it would duplicate this one. @mcwladkoe can you please merge from master and resubmit your PR? Thanks
@mvantellingen I've updated to the latest master, could you please review this Pull Request once again?
@mvantellingen The problem still occurs. After copying the code from this pull request into zeep library, the xml parses correctly. Could you please merge it? I need this change in my project.