def METHOD_NAME(grains):
    """
    Ensure _get_policies works as intended.
    The expansion of lists is tested in the vault utility module unit tests.
    """
    cases = {
        "no-tokens-to-replace": ["no-tokens-to-replace"],
        "single-dict:{minion}": ["single-dict:test-minion"],
        "should-not-cause-an-exception,but-result-empty:{foo}": [],
        "Case-Should-Be-Lowered:{grains[mixedcase]}": [
            "case-should-be-lowered:up-low-up"
        ],
    }
    with patch(
        "salt.utils.minions.get_minion_data",
        MagicMock(return_value=(None, grains, None)),
    ):
        for case, correct_output in cases.items():
            test_config = {"policies": [case]}
            output = vault._get_policies(
                "test-minion", test_config
            )  # pylint: disable=protected-access
            diff = set(output).symmetric_difference(set(correct_output))
            if diff:
                log.debug("Test %s failed", case)
                log.debug("Expected:\n\t%s\nGot\n\t%s", output, correct_output)
                log.debug("Difference:\n\t%s", diff)
            assert output == correct_output