From 079e1a0c312ea6ed66ed42676b25b6ac22db2b58 Mon Sep 17 00:00:00 2001 From: jem-odoo Date: Wed, 17 Jan 2018 08:58:16 +0100 Subject: [PATCH] [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'. --- .../project_timesheet_holidays/tests/test_timesheet_holidays.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_timesheet_holidays/tests/test_timesheet_holidays.py b/addons/project_timesheet_holidays/tests/test_timesheet_holidays.py index b7b7b6fc3fb..fbfdf2afa55 100644 --- a/addons/project_timesheet_holidays/tests/test_timesheet_holidays.py +++ b/addons/project_timesheet_holidays/tests/test_timesheet_holidays.py @@ -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()