1717class TestBulkSalaryStructureAssignment (FrappeTestCase ):
1818 def setUp (self ):
1919 create_company ()
20- create_department ("Accounts" )
20+ self . department = create_department ("Accounts" )
2121 self .grade = create_employee_grade ("Test Grade" )
2222
2323 # employee grade with default base pay 50000
2424 self .emp1 = make_employee (
25- "employee1@bssa.com" , company = "_Test Company" , department = "Accounts" , grade = "Test Grade"
25+ "employee1@bssa.com" , company = "_Test Company" , department = self . department , grade = self . grade . name
2626 )
27- self .emp2 = make_employee ("employee2@bssa.com" , company = "_Test Company" , department = "Accounts" )
28- self .emp3 = make_employee ("employee3@bssa.com" , company = "_Test Company" , department = "Accounts" )
27+ self .emp2 = make_employee ("employee2@bssa.com" , company = "_Test Company" , department = self . department )
28+ self .emp3 = make_employee ("employee3@bssa.com" , company = "_Test Company" , department = self . department )
2929 # no department
3030 self .emp4 = make_employee ("employee4@bssa.com" , company = "_Test Company" )
3131 # different domain in employee_name
32- self .emp5 = make_employee ("employee5@test.com" , company = "_Test Company" , department = "Accounts" )
32+ self .emp5 = make_employee ("employee5@test.com" , company = "_Test Company" , department = self . department )
3333
3434 def tearDown (self ):
3535 frappe .db .rollback ()
@@ -43,7 +43,7 @@ def test_get_employees(self):
4343 args = {
4444 "doctype" : "Bulk Salary Structure Assignment" ,
4545 "from_date" : today ,
46- "department" : "Accounts" ,
46+ "department" : self . department ,
4747 }
4848 bulk_assignment = BulkSalaryStructureAssignment (args )
4949
0 commit comments