test: clear Leave Period before running Leave Allocation tests (#24928)

This commit is contained in:
Sagar Vora 2021-03-17 22:37:59 +05:30 committed by GitHub
parent 7f906f9aaa
commit 52bbd4e182
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,10 @@ from erpnext.hr.doctype.leave_type.test_leave_type import create_leave_type
from erpnext.hr.doctype.leave_ledger_entry.leave_ledger_entry import process_expired_allocation, expire_allocation
class TestLeaveAllocation(unittest.TestCase):
@classmethod
def setUpClass(cls):
frappe.db.sql("delete from `tabLeave Period`")
def test_overlapping_allocation(self):
frappe.db.sql("delete from `tabLeave Allocation`")
@ -177,4 +181,4 @@ def create_leave_allocation(**args):
})
return leave_allocation
test_dependencies = ["Employee", "Leave Type"]
test_dependencies = ["Employee", "Leave Type"]