示例#1
0
    def test_create_mozcontact(self):
        # Initialize a MockContact with the default properties
        contact = MockContact()

        # Add a list of object properties - multiple telephone numbers
        contact['objects'] = [contact['tel'], contact['tel']]

        mozcontact = contact.create_mozcontact()
        for key in mozcontact.iterkeys():
            self.assertFalse(contact.is_mozcontact_api_format(contact[key]))
            self.assertTrue(contact.is_mozcontact_api_format(mozcontact[key]))
示例#2
0
文件: test_contacts.py 项目: 4gh/gaia
    def test_create_mozcontact(self):
        # Initialize a MockContact with the default properties
        contact = MockContact()

        # Add a list of object properties - multiple telephone numbers
        contact['objects'] = [contact['tel'], contact['tel']]

        mozcontact = contact.create_mozcontact()
        for key in mozcontact.iterkeys():
            self.assertFalse(contact.is_mozcontact_api_format(contact[key]))
            self.assertTrue(contact.is_mozcontact_api_format(mozcontact[key]))