def test_appstruct_to_invoicedbdatas(self): from autonomie.forms.task import InvoiceMatch e = InvoiceMatch() datas_ = deepcopy(INV_DATAS) result = e.todb(datas_, {}) assert result['invoice'] == DBDATAS['invoice']
def test_invoice_dbdatas_to_appstruct(self): from autonomie.forms.task import InvoiceMatch e = InvoiceMatch() result = e.toschema(DBDATAS, {}) for field, group in e.matching_map: assert DBDATAS['invoice'][field] == result[group][field]