def METHOD_NAME(config, expected):
    with pytest.raises(EAException) as ea:
        os.environ['ELASTIC_PASS'] = 'password_from_env'
        dir_path = os.path.dirname(os.path.realpath(__file__))
        test_args = mock.Mock()
        test_args.config = dir_path + config
        test_args.rule = None
        test_args.debug = False
        test_args.es_debug_trace = None
        load_conf(test_args)
    assert expected in str(ea)