def METHOD_NAME(self):
    User.objects.create_user('stanne', 'mikael@darktranquillity.com', 'testpass')
    User.objects.create_user('test42', 'test42@example.com', 'testpass')
    form = UserProfileForm({
        'username': 'stanne',
        'email': 'test42@example.com',
        'search_visibility': 0,
        'email_privacy': 0,
    }, instance=User.objects.get(username='stanne'))
    self.assertFalse(form.is_valid())
    self.assertEqual(
        form.errors,
        {'email': ['Please use a unique email address.']}
    )