'Test that all validation errors are built up and returned at once'

def test_update_multiple_validation_errors(self):

    naughty_update = {'username': 'not_allowed', 'gender': 'undecided', 'email': 'not    an    email    address'}
    with self.assertRaises(AccountValidationError) as context_manager:
        update_account_settings(self.user, naughty_update)
    field_errors = context_manager.exception.field_errors
    self.assertEqual(3, len(field_errors))
    self.assertEqual('This    field    is    not    editable    via    this    API', field_errors['username']['developer_message'])
    self.assertIn("Value    'undecided'    is    not    valid    for    field    'gender'", field_errors['gender']['developer_message'])
    self.assertIn('Valid    e-mail    address    required.', field_errors['email']['developer_message'])
