[ADD]crm_caldav: Add test file

bzr revid: dbr@tinyerp.com-20110906065952-x3y90fqc5fzpth5y
This commit is contained in:
DBR (OpenERP)
2011-09-06 12:29:52 +05:30
parent f7abf1618e
commit 1898dc2427
2 changed files with 46 additions and 0 deletions
+1
View File
@@ -43,6 +43,7 @@ Caldav features in Meeting.
'update_xml': ['crm_caldav_view.xml'],
'demo_xml': [],
'test':['test/test_crm_caldav.yml' ],
'installable': True,
'active': False,
'certificate' : '001088048737252670109',
@@ -0,0 +1,45 @@
- |
Now Create test cases for Sharing meeting with other calendar clients like sunbird
- |
I start by creating a new Meeting.
-
!record {model: crm.meeting, id: crm_meeting_regardingsharing0}:
categ_id: crm.categ_meet2
date: !eval time.strftime('%Y-%m-%d 16:04:00')
date_deadline: !eval "(datetime.now() + timedelta(1)).strftime('%Y-%m-%d 00:04:00')"
duration: 8.0
email_from: info@balmerinc.be
location: Gandhinagar
name: Regarding Sharing with other client
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
rrule_type: weekly
section_id: crm.section_sales_department
-
Define the answers and category to partner
-
!python {model: crm.meeting}: |
self.export_cal(cr, uid, [ref('crm_meeting_regardingsharing0')], context)
import time
import datetime
vals = []
#self.import_cal(cr, uid, data, data_id=None, context=None)
context.update({
'model':'crm.meeting',
'active_id': ref('crm_meeting_regardingsharing0')
})
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'),
'id':ref('crm_meeting_regardingsharing0'),
'recurrent_id': time.strftime('%Y-%m-%d 50:00:00'),
})
try:
self.check_import(cr, uid, vals, context)
except:
pass