[IMP] hr: improve test case of job process

bzr revid: jap@tinyerp.com-20111117083143-rjsfxp8ayx78nryr
This commit is contained in:
Jagdish Panchal (Open ERP)
2011-11-17 14:01:43 +05:30
parent 1132f8cb58
commit 376d264fcb
3 changed files with 15 additions and 49 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ You can manage:
],
'test': [
'test/hr_employee_demo.yml',
'test/process/open2recruit2close_job.yml',
'test/open2recruit2close_job.yml',
],
'installable': True,
'active': False,
+6 -40
View File
@@ -1,10 +1,10 @@
-
!record {model: hr.department, id: hr_department_rd0}:
!record {model: hr.department, id: dep_technical, view: False}:
manager_id: base.user_root
name: 'R & D'
-
!record {model: hr.job, id: hr_job_jea0}:
department_id: 'hr_department_rd0'
!record {model: hr.job, id: job_jr_appli, view: False}:
department_id: 'dep_technical'
description: 'Position of Junior Application Engineer'
expected_employees: 5.0
name: 'JAE'
@@ -12,44 +12,10 @@
no_of_recruitment: 5.0
state: open
-
!record {model: hr.job, id: hr_job_jea0}:
employee_ids:
- address_home_id: base.res_partner_address_1
name: Manuel Lehba
department_id: 'hr_department_rd0'
gender: male
parent_id: hr.employee1
-
!record {model: hr.employee, id: hr_employee001, view: False}:
!record {model: hr.employee, id: employee1, view: False}:
address_id: base.main_address
company_id: base.main_company
department_id: hr_department_rd0
department_id: dep_technical
name: smith
parent_id: hr.employee1
user_id: base.user_demo
-
!record {model: hr.employee, id: hr_employee_edwin0}:
address_home_id: base.res_partner_address_3000
address_id: base.res_partner_address_rogerpecker0
department_id: hr.dep_administration
job_id: hr.job_hr_manager
name: Edwin
parent_id: hr.employee2
resource_type: user
time_efficiency: 1.0
user_id: base.user_demo
-
!record {model: hr.employee.category, id: hr_employee_category_fresher0}:
name: Fresher
-
!record {model: hr.employee.category, id: hr_employee_category_juniorlevel0}:
name: Junior Level
parent_id: hr_employee_category_fresher0
-
user_id: base.user_demo
@@ -4,36 +4,36 @@
I open Job Postion of "Jr. Application Engineer" Profile.
-
!python {model: hr.job}: |
self.job_open(cr, uid, [ref('hr_job_jea0')])
self.job_open(cr, uid, [ref('job_jr_appli')])
-
I check state of Job Position after opened it.
-
!assert {model: hr.job, id: hr_job_jea0}:
!assert {model: hr.job, id: job_jr_appli}:
- state == 'open'
-
Now, Recruitement is started so I start recruitement of Job Postion of "Jr. Application Engineer" Profile.
-
!python {model: hr.job}: |
self.job_recruitement(cr, uid, [ref('hr_job_jea0')])
self.job_recruitement(cr, uid, [ref('job_jr_appli')])
-
I check state and number of Expected in Recruitment in Job Position of "Jr. Application Engineer" Profile.
-
!assert {model: hr.job, id: hr_job_jea0}:
!assert {model: hr.job, id: job_jr_appli}:
- state == 'recruit'
- no_of_recruitment == 1.0
-
I hired new employee for the job position so I set Job Position of "Jr. Application Engineer" Profile to new employee.
-
!python {model: hr.employee}: |
self.write(cr, uid, [ref('hr_employee001')], {'job_id':ref('hr_job_jea0')})
self.write(cr, uid, [ref('employee1')], {'job_id':ref('job_jr_appli')})
-
Now I don't want to recruit new employee on this position. so I mark it as Old.
-
!python {model: hr.job}: |
self.job_old(cr, uid, [ref('hr_job_jea0')])
self.job_old(cr, uid, [ref('job_jr_appli')])
-
I check state of Job position and number of Expected in Recruitment after closed Job position.
-
!assert {model: hr.job, id: hr_job_jea0}:
!assert {model: hr.job, id: job_jr_appli}:
- state == 'old'
- no_of_recruitment == 0
- no_of_recruitment == 0