'Assert the user and the user\'s domain are enabled.
:raise AssertionError if the user or the user\'s domain is disabled.'

def assert_user_enabled(self, user_id, user=None):

    if (user is None):
        user = self.get_user(user_id)
    self.resource_api.assert_domain_enabled(user['domain_id'])
    if (not user.get('enabled', True)):
        raise AssertionError((_('User    is    disabled:    %s') % user_id))
