Example #1
0
 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']
Example #2
0
 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']
Example #3
0
 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]
Example #4
0
 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]