def check_password(name, password, runas=None):
    if runas is None:
        runas = salt.utils.get_user()

    cmd = ('rabbit_auth_backend_internal:check_user_login'
        '(<<"{0}">>, [{{password, <<"{1}">>}}]).').format(
        name.replace('"', '\\"'),
        password.replace('"', '\\"'))

    res = __salt__['cmd.run'](
        ['rabbitmqctl', 'eval', cmd],
        runas=runas,
        output_loglevel='quiet',
        python_shell=False)
    msg = 'password-check'

    _response = _format_response(res, msg)
    _key = _response.keys()[0]

    if 'invalid credentials' in _response[_key]:
        return False

    return True
Test load data queries.
dataset/ETHPy150Open saltstack/salt/salt/modules/rabbitmq.py/check_password--crossover with--dataset/ETHPy150Open cloudera/hue/apps/metastore/src/metastore/tests.py/TestMetastoreWithHadoop.test_load_data