[IMP] project_long_term: slightly better error output in scheduling test 1

bzr revid: odo@openerp.com-20111102144724-d5iye0uxpd7p8j0s
This commit is contained in:
Olivier Dony
2011-11-02 15:47:24 +01:00
parent 3d22bb8b55
commit ad7e2a5ee9
@@ -65,10 +65,12 @@
start = (datetime.date.today()).strftime('%Y-%m-%d')
end = (datetime.date.today() + relativedelta(days=1)).strftime('%Y-%m-%d 17:00:00')
first_phase = self.browse(cr, uid, ref('project_phase_firstphase0_case1'))
assert (first_phase.date_start[:10] == start),'Start dates are wrong: %s != %s !' % (first_phase.date_start, start)
assert (first_phase.date_start[:10] == start),'Start dates are wrong: %s != %s !' % (first_phase.date_start[:10], start)
assert (first_phase.date_end >= end),'End dates are wrong: %s <%s!' % (first_phase.date_end, end)
second_phase = self.browse(cr, uid, ref('project_phase_secondphase0_case2'))
start = first_phase.date_end
end = (datetime.date.today() + relativedelta(days=5)).strftime('%Y-%m-%d')
assert (second_phase.date_start >= start and second_phase.date_end >= end),'Dates are wrong on second phase!'
assert second_phase.date_start >= start, 'Dates are wrong on second phase: %s < %s!' % (second_phase.date_start, start)
assert second_phase.date_end >= end, 'Dates are wrong on second phase %s < %s!' % (second_phase.date_end, end)