[IMP] project_timesheet_holidays: better log message when test fails

For some unknown reason (for now), this module tests fails when comparing
generated timesheet number and leaves duration (in days).
By improving the log message, we can have more informations to understand
why the failure happens 'randomly'.
This commit is contained in:
jem-odoo
2018-01-17 14:13:23 +01:00
parent e3333d5e07
commit 079e1a0c31
@@ -84,7 +84,7 @@ class TestTimesheetHolidays(TestTimesheet):
'number_of_days_temp': number_of_days,
})
holiday.sudo().action_validate()
self.assertEquals(len(holiday.timesheet_ids), number_of_days, 'Number of generated timesheets should be the same as the leave duration (1 per day)')
self.assertEquals(len(holiday.timesheet_ids), number_of_days, 'Number of generated timesheets should be the same as the leave duration (1 per day between %s and %s)' % (fields.Datetime.to_string(self.leave_start_datetime), fields.Datetime.to_string(self.leave_end_datetime)))
# manager refuse the leave
holiday.sudo().action_refuse()