summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDBR (OpenERP) <dbr@tinyerp.com>2011-09-06 12:29:52 +0530
committerDBR (OpenERP) <dbr@tinyerp.com>2011-09-06 12:29:52 +0530
commit1898dc2427b4a1bebd6c3800a7f99f2c668ddca4 (patch)
tree111c659f9f93ca91ba9dfe615e58eafecaf1d518
parentf7abf1618e269a8d554c37cce48f724223f7653a (diff)
[ADD]crm_caldav: Add test file
bzr revid: dbr@tinyerp.com-20110906065952-x3y90fqc5fzpth5y
-rw-r--r--addons/crm_caldav/__openerp__.py1
-rw-r--r--addons/crm_caldav/test/test_crm_caldav.yml45
2 files changed, 46 insertions, 0 deletions
diff --git a/addons/crm_caldav/__openerp__.py b/addons/crm_caldav/__openerp__.py
index fdbde1c8d2d..0cf0e700fd1 100644
--- a/addons/crm_caldav/__openerp__.py
+++ b/addons/crm_caldav/__openerp__.py
@@ -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',
diff --git a/addons/crm_caldav/test/test_crm_caldav.yml b/addons/crm_caldav/test/test_crm_caldav.yml
new file mode 100644
index 00000000000..a6d6a24fa9c
--- /dev/null
+++ b/addons/crm_caldav/test/test_crm_caldav.yml
@@ -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
+
+
+