'verify we can create an account and modify it keeping emails in sync'

def test_account_email_sync(self):

    from geonode.people.models import Profile
    email = 'joe@b.ob'
    joebob = Profile.objects.create(username='joebob', email=email)
    self.assertEqual(joebob.emailaddress_set.get(primary=True).email, email)
    email = 'jo@eb.ob'
    joebob.email = email
    joebob.save()
    self.assertEqual(joebob.emailaddress_set.get(primary=True).email, email)
    email = joebob.emailaddress_set.get(primary=True)
    email.email = 'j@oe.bob'
    email.save()
    joebob = Profile.objects.get(id=joebob.id)
    self.assertEqual(email.email, joebob.email)
