[FIX] project_timesheet_holidays: fix tests

Handling datetime is not a good idea, mostly
when computing different in terms of days.
Forcing the hour (time) will set the tests correctly
regarding the working hours, and the datetime
difference, independently of the execution time
of the test.
This commit is contained in:
Jérome Maes
2017-05-11 18:27:33 +02:00
parent 0d4ed7abf5
commit e7e8ecc77b
@@ -17,7 +17,7 @@ class TestTimesheetHolidays(TestTimesheet):
self.employee_working_calendar = self.empl_employee.resource_calendar_id
# leave dates : from next monday to next wednesday (to avoid crashing tests on weekend, when
# there is no work days in working calendar)
self.leave_start_datetime = datetime.today() + relativedelta(weeks=0, days=1, weekday=0)
self.leave_start_datetime = datetime.today().replace(hour=7, minute=0) + relativedelta(weeks=0, days=1, weekday=0)
self.leave_end_datetime = self.leave_start_datetime + relativedelta(days=3)
# all company have those internal project/task (created by default)