From 61bd6ccc2b6b002651d92ce628592b4d03b44b7a Mon Sep 17 00:00:00 2001 From: thefalconx33 Date: Thu, 26 Dec 2019 18:23:05 +0530 Subject: [PATCH] fix: travis failing for leave application test --- .../doctype/leave_application/test_leave_application.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/hr/doctype/leave_application/test_leave_application.py b/erpnext/hr/doctype/leave_application/test_leave_application.py index b9c02101f1..b6216424de 100644 --- a/erpnext/hr/doctype/leave_application/test_leave_application.py +++ b/erpnext/hr/doctype/leave_application/test_leave_application.py @@ -235,8 +235,8 @@ class TestLeaveApplication(unittest.TestCase): frappe.get_doc(dict( doctype = 'Holiday List', holiday_list_name = holiday_list, - from_date = date(date.today().year, 1, 1), - to_date = date(date.today().year, 12, 31), + from_date = add_months(today, -6), + to_date = add_months(today, 6), holidays = [ dict(holiday_date = today, description = 'Test') ] @@ -597,8 +597,8 @@ def get_leave_period(): return frappe.get_doc(dict( name = 'Test Leave Period', doctype = 'Leave Period', - from_date = "{0}-12-01".format(now_datetime().year - 1), - to_date = "{0}-12-31".format(now_datetime().year), + from_date = add_months(nowdate(), -6), + to_date = add_months(nowdate(), 6), company = "_Test Company", is_active = 1 )).insert()