facho/facho.py: adiciona replacement_for para sustitucion.
FossilOrigin-Name: 5e9210afdf4577388a206310ded9abbcf129d02f3818671aba3aad1282726466
This commit is contained in:
@@ -170,3 +170,11 @@ def test_facho_xml_fragment_relative():
|
||||
invoice = xml.fragment('./Invoice')
|
||||
invoice.set_element('./Id', 1)
|
||||
assert xml.tostring() == '<root><Invoice><Id>1</Id></Invoice></root>'
|
||||
|
||||
|
||||
def test_facho_xml_replacement_for():
|
||||
xml = facho.FachoXML('root')
|
||||
xml.placeholder_for('./child/type')
|
||||
xml.replacement_for('./child/type',
|
||||
'./child/code', 'test')
|
||||
assert xml.tostring() == '<root><child><code>test</code></child></root>'
|
||||
|
||||
Reference in New Issue
Block a user