mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 03:09:09 +00:00
test: fix salary component not found; other optimisation (#24920)
This commit is contained in:
@@ -13,9 +13,18 @@ from erpnext.projects.doctype.timesheet.timesheet import make_salary_slip, make_
|
||||
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
|
||||
from erpnext.payroll.doctype.salary_structure.test_salary_structure \
|
||||
import make_salary_structure, create_salary_structure_assignment
|
||||
from erpnext.payroll.doctype.salary_slip.test_salary_slip import (
|
||||
make_earning_salary_component,
|
||||
make_deduction_salary_component
|
||||
)
|
||||
from erpnext.hr.doctype.employee.test_employee import make_employee
|
||||
|
||||
class TestTimesheet(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
make_earning_salary_component(setup=True, company_list=['_Test Company'])
|
||||
make_deduction_salary_component(setup=True, company_list=['_Test Company'])
|
||||
|
||||
def setUp(self):
|
||||
for dt in ["Salary Slip", "Salary Structure", "Salary Structure Assignment", "Timesheet"]:
|
||||
frappe.db.sql("delete from `tab%s`" % dt)
|
||||
|
||||
Reference in New Issue
Block a user