facho/fe/form.py: correcion identificador InvoiceLine/cbc:ID

FossilOrigin-Name: d3f7682487635e42acb9c15fcb1668beab6ea085e74e3ca55c147121f2ca59bb
This commit is contained in:
2020-05-27 16:47:55 +00:00
parent d0581628e3
commit bafd58124d
3 changed files with 13 additions and 7 deletions

View File

@@ -107,3 +107,10 @@ def test_invoicesimple_zip(simple_invoice):
xml_data = dianzip.open(name_invoice).read().decode('utf-8')
assert xml_data == str(xml_invoice)
def test_bug_cbcid_empty_on_invoice_line(simple_invoice):
xml_invoice = form.DIANInvoiceXML(simple_invoice)
print(str(xml_invoice))
cbc_id = xml_invoice.get_element_text('/fe:Invoice/fe:InvoiceLine[1]/cbc:ID', format_=int)
assert cbc_id == 1