def testRegisterContact(self):
    # Create a contact.
    user_dict = {'name': 'Andrew Kimball', 'email': 'kimball.andy@emailscrubbed.com', 'verified_email': True}
    identity_key = 'Email:%s' % user_dict['email']
    contact_dict = Contact.CreateContactDict(self._user.user_id,
                                             [(identity_key, None)],
                                             util._TEST_TIME,
                                             Contact.GMAIL,
                                             name=user_dict['name'])
    self._UpdateOrAllocateDBObject(Contact, **contact_dict)

    # Register the new user.
    user, device_id = self._tester.RegisterGoogleUser(user_dict)
    response_dict = self._tester.QueryNotifications(self._cookie, 1, scan_forward=False)
    self.assertEqual([notify_dict['name'] for notify_dict in response_dict['notifications']],
                     ['first register contact'])
Register an identity that is the target of a contact, which will
dataset/ETHPy150Open viewfinderco/viewfinder/backend/www/test/auth_test.py/AuthTestCase.testRegisterContact