[REV] Restoring old tests
bzr revid: rim@openerp.com-20140305142354-1nbuvpxgsjxsgvcm
This commit is contained in:
parent
d9d3dbaf8a
commit
da5fc3cb77
|
@ -1,7 +1,7 @@
|
|||
-
|
||||
I check that state of "Employee Evaluation" survey is Open.
|
||||
-
|
||||
!assert {model: survey.survey, id: appraisal_form, severity: error, string: Survey should be in OPen state}:
|
||||
!assert {model: survey.survey, id: appraisal_form, severity: error, string: Survey should be in 'open' state}:
|
||||
- state == 'open'
|
||||
-
|
||||
I start the evaluation process by click on "Start Evaluation" button.
|
||||
|
@ -33,6 +33,33 @@
|
|||
assert evaluation.state == 'wait', "Evaluation should be 'Plan in progress' state"
|
||||
interview_ids = interview_obj.search(cr, uid, [('evaluation_id','=', ref('hr_evaluation_evaluation_0'))])
|
||||
assert len(interview_ids), "Interview evaluation survey not created"
|
||||
-
|
||||
Give answer of the first page in "Employee Evaluation" survey.
|
||||
-
|
||||
!python {model: survey.question.wiz}: |
|
||||
name_wiz_obj=self.pool.get('survey.name.wiz')
|
||||
interview_obj = self.pool.get('hr.evaluation.interview')
|
||||
interview_ids = interview_obj.search(cr, uid, [('evaluation_id','=', ref('hr_evaluation_evaluation_0'))])
|
||||
assert len(interview_ids), "Interview evaluation survey not created"
|
||||
ctx = {'active_model':'hr.evaluation.interview', 'active_id': interview_ids[0], 'active_ids': [interview_ids], 'survey_id': ref("survey_2")}
|
||||
name_id = name_wiz_obj.create(cr, uid, {'survey_id': ref("survey_2")})
|
||||
ctx ["sur_name_id"] = name_id
|
||||
self.create(cr, uid, {str(ref("survey_question_2")) +"_" +str(ref("survey_answer_1")) + "_multi" :'tpa',
|
||||
str(ref("survey_question_2")) +"_" +str(ref("survey_answer_10")) + "_multi" :'application eng',
|
||||
str(ref("survey_question_2")) +"_" +str(ref("survey_answer_20")) + "_multi" :'3',
|
||||
str(ref("survey_question_2")) +"_" +str(ref("survey_answer_25")) + "_multi" :'2011-12-02 16:42:00',
|
||||
str(ref("survey_question_2")) +"_" +str(ref("survey_answer_43")) + "_multi" :'HR',
|
||||
}, context = ctx)
|
||||
-
|
||||
I close this Evaluation survey by giving answer of questions.
|
||||
-
|
||||
!python {model: hr_evaluation.evaluation}: |
|
||||
interview_obj = self.pool.get('hr.evaluation.interview')
|
||||
evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0'))
|
||||
interview_obj.survey_req_done(cr, uid, [r.id for r in evaluation.survey_request_ids])
|
||||
for survey in evaluation.survey_request_ids:
|
||||
interview = interview_obj.browse(cr, uid, survey.id, context)
|
||||
assert interview.state == "done", 'survey must be in done state'
|
||||
-
|
||||
I print the evaluation.
|
||||
-
|
||||
|
|
Loading…
Reference in New Issue