al insertar elemento se ubica continuo a los primos
FossilOrigin-Name: 3c26c6d8803c30d15f9baa083fc8cfc2ed8993061196f3299162d6a899680735
This commit is contained in:
@@ -209,3 +209,13 @@ def test_facho_xml_get_element_attribute():
|
||||
xml = facho.FachoXML('root')
|
||||
xml.set_element('./Id', 'mero', code = 'ABC')
|
||||
assert xml.get_element_attribute('/root/Id', 'code') == 'ABC'
|
||||
|
||||
def test_facho_xml_keep_orden_slibing():
|
||||
xml = facho.FachoXML('root')
|
||||
xml.find_or_create_element('./A')
|
||||
xml.find_or_create_element('./B')
|
||||
xml.find_or_create_element('./C')
|
||||
xml.find_or_create_element('./B', append=True)
|
||||
xml.find_or_create_element('./A', append=True)
|
||||
|
||||
assert xml.tostring() == '<root><A/><A/><B/><B/><C/></root>'
|
||||
|
||||
Reference in New Issue
Block a user