← Back to team overview

openerp-dev-web team mailing list archive

lp:~openerp-dev/openobject-addons/trunk-calendar-yaml_import_event-uco into lp:~openerp-dev/openobject-addons/trunk-calendar

 

Ujjvala Collins (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-calendar-yaml_import_event-uco into lp:~openerp-dev/openobject-addons/trunk-calendar.

Requested reviews:
  OpenERP R&D Team (openerp-dev)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-calendar-yaml_import_event-uco/+merge/54164

[ADD]: Added yaml for sync_google_calendar.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-calendar-yaml_import_event-uco/+merge/54164
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-dev/openobject-addons/trunk-calendar-yaml_import_event-uco into lp:~openerp-dev/openobject-addons/trunk-calendar.
=== modified file 'sync_google_calendar/__openerp__.py'
--- sync_google_calendar/__openerp__.py	2011-03-14 13:25:00 +0000
+++ sync_google_calendar/__openerp__.py	2011-03-21 08:42:47 +0000
@@ -30,6 +30,7 @@
     'depends': ['base','google_base_account', 'crm'],
     'init_xml': [],
     'update_xml': ['wizard/wizard_import_calendar_events_view.xml', 'sync_google_calendar_view.xml'],
+    'test': ['test/test_sync_google_calendar.yml'],
     'demo_xml': [],
     'installable': True,
     'active': False,

=== added directory 'sync_google_calendar/test'
=== added file 'sync_google_calendar/test/test_sync_google_calendar.yml'
--- sync_google_calendar/test/test_sync_google_calendar.yml	1970-01-01 00:00:00 +0000
+++ sync_google_calendar/test/test_sync_google_calendar.yml	2011-03-21 08:42:47 +0000
@@ -0,0 +1,36 @@
+-
+  In order to test google calendar feature with OpenERP, I import events from
+  a google account and store them in Meetings.
+- |
+  I create a record for the gmail account for which I want to import the contacts.
+- 
+  !record {model: google.login, id: google_login_contact_id0}:
+    user: testmail.openerp
+    password: openerptiny
+- |
+  I login into that account.
+-
+  !python {model: google.login}: |
+    self.check_login(cr, uid, [ref('google_login_contact_id0')], context)
+- |
+  Now I want to import all the events from all the calendars in the user account.
+- |
+  I select all calendars.
+-
+  !record {model: synchronize.google.calendar, id: synchronize_google_calendar_id0}:
+    calendar_name: all
+- |
+  I import the events from the google calendar.
+-
+  !python {model: synchronize.google.calendar}: |
+    self.import_calendar_events(cr, uid, [ref('synchronize_google_calendar_id0')], context)
+- |
+  Now I check my meetings are created or not.
+-
+  !python {model: crm.meeting}: |
+    model_obj = self.pool.get('ir.model.data')
+    meeting_ids = self.search(cr, uid, [])
+    model_ids = model_obj.search(cr, uid, [('res_id','in',meeting_ids),('model','=','crm.meeting'),('module','=','sync_google_calendar')])
+    assert model_ids, 'Meetings not created !'
+    
+    
\ No newline at end of file


Follow ups