summaryrefslogtreecommitdiff
path: root/addons/hr_holidays/tests/test_automatic_leave_dates.py
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2019-11-04 16:34:54 +0100
committerYannick Tivisse <yti@odoo.com>2019-11-05 13:08:03 +0100
commitb1689d7c7e4576b5deda0b13f8014d9e80d2e80d (patch)
tree2cfad0b05cc7c238018867ec051d7b95eb3082ef /addons/hr_holidays/tests/test_automatic_leave_dates.py
parent886cc7600af0bd8108eeb412e054bb58169bbfe0 (diff)
[IMP] hr_holidays: Adapt tests to work with/without demo data
Diffstat (limited to 'addons/hr_holidays/tests/test_automatic_leave_dates.py')
-rw-r--r--addons/hr_holidays/tests/test_automatic_leave_dates.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/hr_holidays/tests/test_automatic_leave_dates.py b/addons/hr_holidays/tests/test_automatic_leave_dates.py
index a709be09f9a..cacb1975b7d 100644
--- a/addons/hr_holidays/tests/test_automatic_leave_dates.py
+++ b/addons/hr_holidays/tests/test_automatic_leave_dates.py
@@ -154,6 +154,7 @@ class TestAutomaticLeaveDates(TestHrHolidaysBase):
self.assertEqual(leave_form.number_of_hours_display, 8)
def test_attendance_next_day(self):
+ self.env.user.tz = 'Europe/Brussels'
calendar = self.env['resource.calendar'].create({
'name': 'auto next day',
'attendance_ids': [(5, 0, 0),
@@ -183,6 +184,7 @@ class TestAutomaticLeaveDates(TestHrHolidaysBase):
self.assertEqual(leave_form.date_to, datetime(2019, 9, 2, 10, 0, 0))
def test_attendance_previous_day(self):
+ self.env.user.tz = 'Europe/Brussels'
calendar = self.env['resource.calendar'].create({
'name': 'auto next day',
'attendance_ids': [(5, 0, 0),
@@ -212,6 +214,7 @@ class TestAutomaticLeaveDates(TestHrHolidaysBase):
self.assertEqual(leave_form.date_to, datetime(2019, 9, 3, 10, 0, 0))
def test_2weeks_calendar(self):
+ self.env.user.tz = 'Europe/Brussels'
calendar = self.env['resource.calendar'].create({
'name': 'auto next day',
'two_weeks_calendar': True,
@@ -265,6 +268,7 @@ class TestAutomaticLeaveDates(TestHrHolidaysBase):
self.assertEqual(leave_form.date_to, datetime(2019, 9, 9, 10, 0, 0))
def test_2weeks_calendar_next_week(self):
+ self.env.user.tz = 'Europe/Brussels'
calendar = self.env['resource.calendar'].create({
'name': 'auto next day',
'two_weeks_calendar': True,