-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Null value which stands in for a forced XML nil value
This allows things to be specifically unset, which was not previously possible. At present the reverse path for decoding this has not been implemented.
- Loading branch information
Showing
4 changed files
with
37 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
import pytest # noqa: F401 | ||
from lxml import etree | ||
from null_object import Null | ||
|
||
from broadworks_ocip import BroadworksAPI | ||
|
||
|
@@ -425,13 +426,14 @@ def test_nested_elements(): | |
phone_number="123456789", | ||
extension="1219", | ||
# sip_alias_list=api.get_type_object("ReplacementSIPAliasList",sip_alias=[]), | ||
sip_alias_list=Null, | ||
endpoint=dict( | ||
trunk_addressing=api.get_type_object( | ||
"TrunkAddressingMultipleContactModify", | ||
# trunk_group_device_endpoint=None, | ||
trunk_group_device_endpoint=Null, | ||
enterprise_trunk_name="ET02", | ||
# alternate_trunk_identity=None, | ||
# physical_location=None, | ||
alternate_trunk_identity=Null, | ||
physical_location=Null, | ||
), | ||
), | ||
) | ||
|
@@ -444,13 +446,13 @@ def test_nested_elements(): | |
b"<userId>[email protected]</userId>" | ||
b"<phoneNumber>123456789</phoneNumber>" | ||
b"<extension>1219</extension>" | ||
# b'<sipAliasList xsi:nil="true"/>' | ||
b'<sipAliasList xsi:nil="true"/>' | ||
b"<endpoint>" | ||
b"<trunkAddressing>" | ||
# b'<trunkGroupDeviceEndpoint xsi:nil="true"/>' | ||
b'<trunkGroupDeviceEndpoint xsi:nil="true"/>' | ||
b"<enterpriseTrunkName>ET02</enterpriseTrunkName>" | ||
# b'<alternateTrunkIdentity xsi:nil="true"/>' | ||
# b'<physicalLocation xsi:nil="true"/>' | ||
b'<alternateTrunkIdentity xsi:nil="true"/>' | ||
b'<physicalLocation xsi:nil="true"/>' | ||
b"</trunkAddressing>" | ||
b"</endpoint>" | ||
b"</command>" | ||
|