Пример #1
0
    def store_contacts(contact_list, reference):

        for contact in contact_list:

            if contact.get('gd$email') is None:
                continue

            name = contact.get('title').get('$t')
            email = contact.get('gd$email')[0].get('address')
            contact = Contact.get_contact_by_mail(email)

            if contact is None:
                _contact = Contact(name=name, email=email, reference=reference)
                Contact.create_contact(_contact)

        ContactService.mail_to_contact("praveen", "*****@*****.**")
Пример #2
0
 def test_get_contact_by_mail(self):
     Contact(email='*****@*****.**').put()
     self.assertEqual('*****@*****.**',
                      Contact.get_contact_by_mail('*****@*****.**').email)