'Verifies that under thirteens never return a public profile.'

@ddt.data(('client', 'user', True), ('different_client', 'different_user', False), ('staff_client', 'staff_user', True))
@ddt.unpack
def test_parental_consent(self, api_client, requesting_username, has_full_access):

    client = self.login_client(api_client, requesting_username)
    legacy_profile = UserProfile.objects.get(id=self.user.id)
    current_year = datetime.datetime.now().year
    legacy_profile.year_of_birth = (current_year - 10)
    legacy_profile.save()
    set_user_preference(self.user, ACCOUNT_VISIBILITY_PREF_KEY, ALL_USERS_VISIBILITY)
    response = self.send_get(client)
    if has_full_access:
        data = response.data
        self.assertEqual(17, len(data))
        self.assertEqual(self.user.username, data['username'])
        self.assertEqual(((self.user.first_name + '    ') + self.user.last_name), data['name'])
        self.assertEqual(self.user.email, data['email'])
        self.assertEqual((current_year - 10), data['year_of_birth'])
        for empty_field in ('country', 'level_of_education', 'mailing_address', 'bio'):
            self.assertIsNone(data[empty_field])
        self.assertEqual('m', data['gender'])
        self.assertEqual('Learn    a    lot', data['goals'])
        self.assertTrue(data['is_active'])
        self.assertIsNotNone(data['date_joined'])
        self._verify_profile_image_data(data, False)
        self.assertTrue(data['requires_parental_consent'])
        self.assertEqual(PRIVATE_VISIBILITY, data['account_privacy'])
    else:
        self._verify_private_account_response(response, requires_parental_consent=True, account_privacy=PRIVATE_VISIBILITY)
    response = self.send_get(client, query_parameters='view=shared')
    self._verify_private_account_response(response, requires_parental_consent=True, account_privacy=PRIVATE_VISIBILITY)
