Exemplo n.º 1
0
 def test_paymentlines_dbdatas_to_appstruct(self):
     from autonomie.forms.task import PaymentLinesMatch
     p = PaymentLinesMatch()
     result = p.toschema(DBDATAS, {})
     lines = deepcopy(DBDATAS['payment_lines'])
     lines = sorted(lines, key=lambda row:int(row['rowIndex']))
     for line in lines:
         del(line['rowIndex'])
     for i,line in enumerate(lines):
         assert result['payments']['payment_lines'][i] == line
Exemplo n.º 2
0
 def test_paymentlines_dbdatas_to_appstruct(self):
     from autonomie.forms.task import PaymentLinesMatch
     p = PaymentLinesMatch()
     result = p.toschema(DBDATAS, {})
     lines = deepcopy(DBDATAS['payment_lines'])
     lines = sorted(lines, key=lambda row: int(row['rowIndex']))
     for line in lines:
         del (line['rowIndex'])
     for i, line in enumerate(lines):
         assert result['payments']['payment_lines'][i] == line
Exemplo n.º 3
0
 def test_appstruct_to_paymentlinesdbdatas(self):
     from autonomie.forms.task import PaymentLinesMatch
     p = PaymentLinesMatch()
     datas_ = deepcopy(DATAS)
     result = p.todb(datas_, {})
     assert result['payment_lines'] == DBDATAS['payment_lines']
Exemplo n.º 4
0
 def test_appstruct_to_paymentlinesdbdatas(self):
     from autonomie.forms.task import PaymentLinesMatch
     p = PaymentLinesMatch()
     datas_ = deepcopy(DATAS)
     result = p.todb(datas_, {})
     assert result['payment_lines'] == DBDATAS['payment_lines']