-
  In order to test Importing contacts from any google account into OpenERP,
  I use a gmail account and import the contact details and store them as Partner addresses.
- |
  I create a record for the gmail account for which I want to import the contacts.
- 
  !record {model: google.login, id: google_login_id0}:
    user: testmail.openerp@gmail.com
    password: openerptiny
- |
  I login into that account.
-
  !python {model: google.login}: |
    self.login(cr, uid, [ref('google_login_id0')], context)
- |
  Now I select from which group I want to get the contact details.
-
  !record {model: synchronize.google.import, id: synchronize_google_import_id0}:
    create_partner: create_address
    group_name: all
    calendar_name: all
- |
  I import the contacts and I also check if the contact already exists in db and updates the address.
-
  !python {model: synchronize.google.import}: |
    self.import_google(cr, uid, [ref('synchronize_google_import_id0')], context={'contact':True})
- |
  I check whether the Contacts are created in Partner address or not.
-
  !python {model: res.partner.address}: |
    addr_obj = self.pool.get('ir.model.data')
    data_ids = addr_obj.search(cr, uid, [('model','=','res.partner.address'),('module','=','synchronize_google')])
    assert data_ids, 'Addresses not created !'
    