Exemplo n.º 1
0
 def test_discountlines_dbdatas_to_appstruct(self):
     from autonomie.forms.task import DiscountLinesMatch
     d = DiscountLinesMatch()
     result = d.toschema(DBDATAS, {})
     from copy import deepcopy
     lines = deepcopy(DBDATAS['discounts'])
     for i, line in enumerate(lines):
         assert result['lines']['discounts'][i] == line
Exemplo n.º 2
0
 def test_discountlines_dbdatas_to_appstruct(self):
     from autonomie.forms.task import DiscountLinesMatch
     d = DiscountLinesMatch()
     result = d.toschema(DBDATAS, {})
     from copy import deepcopy
     lines = deepcopy(DBDATAS['discounts'])
     for i, line in enumerate(lines):
         assert result['lines']['discounts'][i] == line
Exemplo n.º 3
0
 def test_appstruct_to_discountlines_dbdatas(self):
     from autonomie.forms.task import DiscountLinesMatch
     datas_ = deepcopy(DATAS)
     d = DiscountLinesMatch()
     result = d.todb(datas_, {})
     assert result['discounts'] == DBDATAS['discounts']
Exemplo n.º 4
0
 def test_appstruct_to_discountlines_dbdatas(self):
     from autonomie.forms.task import DiscountLinesMatch
     datas_ = deepcopy(DATAS)
     d = DiscountLinesMatch()
     result = d.todb(datas_, {})
     assert result['discounts'] == DBDATAS['discounts']