[ADD]project_caldav: Add the test file
bzr revid: dbr@tinyerp.com-20110908071204-1rtvl8o6wkbzrhg6
This commit is contained in:
@@ -34,6 +34,7 @@ on a remote server.
|
||||
"depends": ["project", "caldav", "base_calendar"],
|
||||
"init_xml": ["project_caldav_data.xml", 'project_caldav_setup.xml', ],
|
||||
"demo_xml": [],
|
||||
"test": ['test/test_project_caldav.yml'],
|
||||
"update_xml": ["project_caldav_view.xml"],
|
||||
"active": False,
|
||||
"website": "http://www.openerp.com",
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
- |
|
||||
Now Create test cases for project caldav
|
||||
-
|
||||
I create task 'Training task' for this project.
|
||||
-
|
||||
!record {model: project.task, id: project_task_technicaltasktraining}:
|
||||
date_start: !eval time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
name: Technical Training
|
||||
user_id: base.user_root
|
||||
planned_hours: 30.0
|
||||
date_deadline: !eval time.strftime('%Y-%m-%d 20:20:00')
|
||||
remaining_hours: 30.0
|
||||
state: draft
|
||||
-
|
||||
Open the created task.
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
context.update({'model':'project.task','active_id': ref('project_task_technicaltasktraining')})
|
||||
self.open_task(cr, uid, [ref('project_task_technicaltasktraining')], context)
|
||||
-
|
||||
Check the export functionality.
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
context.update({'model':'project.task','active_id': ref('project_task_technicaltasktraining')})
|
||||
self.export_cal(cr, uid, [ref('project_task_technicaltasktraining')], context)
|
||||
-
|
||||
Check the Import functionality with the define date.
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
import time
|
||||
vals = []
|
||||
context.update({'model':'project.task','active_id': ref('project_task_technicaltasktraining')})
|
||||
vals.append({
|
||||
'date': time.strftime('%Y-%m-%d 16:04:00'),
|
||||
'date_deadline':time.strftime('%Y-%m-%d 20:20:00'),
|
||||
})
|
||||
try:
|
||||
self.check_import(cr, uid, vals, context)
|
||||
except:
|
||||
pass
|
||||
-
|
||||
Check the export Import functionality with the planned hours.
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
import time
|
||||
vals = []
|
||||
context.update({'model':'project.task','active_id': ref('project_task_technicaltasktraining')})
|
||||
vals.append({
|
||||
'date': time.strftime('%Y-%m-%d 16:04:00'),
|
||||
'create_date': time.strftime('%Y-%m-%d 16:04:00'),
|
||||
'date_deadline':time.strftime('%Y-%m-%d 20:20:00'),
|
||||
'planned_hours':30.0,
|
||||
'ids':ref('project_task_technicaltasktraining'),
|
||||
'recurrent_id': time.strftime('%Y-%m-%d 50:00:00'),
|
||||
})
|
||||
try:
|
||||
self.check_import(cr, uid, vals, context)
|
||||
except:
|
||||
pass
|
||||
Reference in New Issue
Block a user