'Creating a registration profile for a user populates the
profile with the correct user and a SHA1 hash to use as
activation key.'

def test_profile_creation(self):

    new_user = UserModel().objects.create_user(**self.user_info)
    profile = self.registration_profile.objects.create_profile(new_user)
    self.assertEqual(self.registration_profile.objects.count(), 1)
    self.assertEqual(profile.user.id, new_user.id)
    self.failUnless(re.match('^[a-f0-9]{40}$', profile.activation_key))
    self.assertEqual(six.text_type(profile), 'Registration    information    for    alice')
