diff options
| author | Harry (OpenERP) <hmo@tinyerp.com> | 2011-12-14 17:59:24 +0530 |
|---|---|---|
| committer | Harry (OpenERP) <hmo@tinyerp.com> | 2011-12-14 17:59:24 +0530 |
| commit | 092f97b32b35af6a40b9d2ae70c3159da2fb235f (patch) | |
| tree | 2974d3719af9338cd0b1814da900d7e9ca8d4779 /addons/project/test/task_process.yml | |
| parent | 593f5f571bbc49673975afc405e9345ef3457b92 (diff) | |
| parent | e36dc8c5e3ca3da1474747bae5ec87fea19b23b8 (diff) | |
[MERGE] merged with trunk-development-branch
bzr revid: hmo@tinyerp.com-20111214122924-izzibrz1yz67rt7g
Diffstat (limited to 'addons/project/test/task_process.yml')
| -rw-r--r-- | addons/project/test/task_process.yml | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/addons/project/test/task_process.yml b/addons/project/test/task_process.yml new file mode 100644 index 00000000000..73250de2963 --- /dev/null +++ b/addons/project/test/task_process.yml @@ -0,0 +1,76 @@ +- + I put task in pending due to specification is not clear. +- + !python {model: project.task}: | + self.do_pending(cr, uid, [ref("project_task_1")]) + context.update({"active_id": ref("project_task_1")}) +- + I check state of task after put in pending. +- + !assert {model: project.task, id: project_task_1, severity: error, string: task should be in pending state}: + - state == "pending" +- + !record {model: project.task.delegate, id: delegate_id}: + user_id: res_users_analyst + planned_hours: 12.0 + planned_hours_me: 2.0 +- + Now I delegate task to team member. +- + !python {model: project.task.delegate}: | + self.delegate(cr, uid, [ref("delegate_id")], {"active_id": ref("project_task_1")}) +- + I check delegated task details. +- + !python {model: project.task}: | + task = self.browse(cr, uid, ref("project_task_1"), context=context) + assert task.planned_hours == 2.0, "Planning hours is not correct after delegated." + assert task.state == "pending", "Task should be in Pending after delegated." +- + I re-open the task. +- + !python {model: project.task}: | + self.do_reopen(cr, uid, [ref("project_task_1")]) +- + I check reopened task details. +- + !assert {model: project.task, id: project_task_1, severity: error, string: task should be open.}: + - state == "open" +- + I change the stage of task to next stage. +- + !python {model: project.task}: | + self.next_type(cr, uid, [ref("project_task_1")]) +- + !record {model: project.task.reevaluate, id: reevaluate_id}: + remaining_hours : 120 +- + I reevaluate task with remaining hours. +- + !python {model: project.task.reevaluate}: | + self.compute_hours(cr, uid, [ref("reevaluate_id")], {"active_id": ref("project_task_1")}) +- + I check remaining hours after reevaluated task. +- + !assert {model: project.task, id: project_task_1, severity: error, string: task should be reevaluated}: + - remaining_hours == 120.0 +- + I close the task. +- + !python {model: project.task}: | + self.action_close(cr, uid, [ref("project_task_1")]) +- + I check state after closed. +- + !assert {model: project.task, id: project_task_1, severity: error, string: task is in open state}: + - state == "done" +- + I change the stage of task to previous stage. +- + !python {model: project.task}: | + self.prev_type(cr, uid, [ref("project_task_1")]) +- + I cancel Task. +- + !python {model: project.task}: | + self.do_cancel(cr, uid, [ref("project_task_2")])
\ No newline at end of file |
