'USERNAME_FIELD should not appear in REQUIRED_FIELDS.'

@override_settings(AUTH_USER_MODEL=u'auth.CustomUserBadRequiredFields')
def test_username_not_in_required_fields(self):

    new_io = StringIO()
    get_validation_errors(new_io, get_app(u'auth'))
    self.assertIn(u'The    field    named    as    the    USERNAME_FIELD    should    not    be    included    in    REQUIRED_FIELDS    on    a    swappable    User    model.', new_io.getvalue())
