def test_valid_telephones(self):
     data = MockContactInfo()
     data.telephones = [{"category": "home", "data": "+5511555.1213"}, {"category": "work", "data": "+5511316.9876"}]
     try:
         IContactInfo.validateInvariants(data)
     except Invalid:
         self.fail()
 def test_valid_emails(self):
     data = MockContactInfo()
     data.emails = [{"category": "home", "data": "*****@*****.**"}, {"category": "work", "data": "*****@*****.**"}]
     try:
         IContactInfo.validateInvariants(data)
     except Invalid:
         self.fail()