def test_appstruct_to_estimationdbdatas(self): from autonomie.forms.task import EstimationMatch datas_ = deepcopy(DATAS) e = EstimationMatch() result = e.todb(datas_, {}) dbdatas_ = deepcopy(DBDATAS) del(dbdatas_['estimation']['manualDeliverables']) assert result['estimation'] == dbdatas_['estimation']
def test_appstruct_to_estimationdbdatas(self): from autonomie.forms.task import EstimationMatch datas_ = deepcopy(DATAS) e = EstimationMatch() result = e.todb(datas_, {}) dbdatas_ = deepcopy(DBDATAS) del (dbdatas_['estimation']['manualDeliverables']) assert result['estimation'] == dbdatas_['estimation']
def test_estimation_dbdatas_to_appstruct(self): from autonomie.forms.task import EstimationMatch e = EstimationMatch() result = e.toschema(DBDATAS, {}) for field, group in e.matching_map: assert DBDATAS['estimation'][field] == result[group][field]