fix: flaky tests
This commit is contained in:
parent
558650bc3a
commit
d61c437588
@ -274,7 +274,7 @@ class TestLeaveApplication(unittest.TestCase):
|
||||
employee = get_employee()
|
||||
first_sunday = get_first_sunday(self.holiday_list)
|
||||
|
||||
leave_application = make_leave_application(employee.name, add_days(first_sunday, 1), add_days(first_sunday, 4), leave_type.name)
|
||||
leave_application = make_leave_application(employee.name, first_sunday, add_days(first_sunday, 3), leave_type.name)
|
||||
leave_application.reload()
|
||||
self.assertEqual(leave_application.total_leave_days, 4)
|
||||
self.assertEqual(frappe.db.count('Attendance', {'leave_application': leave_application.name}), 4)
|
||||
|
@ -65,7 +65,7 @@ class TestEmployeeLeaveBalance(unittest.TestCase):
|
||||
leave_application2.reload()
|
||||
|
||||
filters = frappe._dict({
|
||||
'date': self.date,
|
||||
'date': add_days(leave_application2.to_date, 1),
|
||||
'company': '_Test Company',
|
||||
'employee': self.employee_id
|
||||
})
|
||||
@ -100,7 +100,7 @@ class TestEmployeeLeaveBalance(unittest.TestCase):
|
||||
|
||||
# Leave balance should show actual balance, and not "consumption balance as per remaining days", near alloc end date
|
||||
# eg: 3 days left for alloc to end, leave balance should still be 26 and not 3
|
||||
frappe._dict({
|
||||
filters = frappe._dict({
|
||||
'date': add_days(self.year_end, -3),
|
||||
'company': '_Test Company',
|
||||
'employee': self.employee_id
|
||||
|
Loading…
x
Reference in New Issue
Block a user