def test_minion_load_grains_false():
    """
    Minion does not generate grains when load_grains is False
    """
    opts = {"random_startup_delay": 0, "grains": {"foo": "bar"}}
    with patch("salt.loader.grains") as grainsfunc:
        minion = salt.minion.Minion(opts, load_grains=False)
        assert minion.opts["grains"] == opts["grains"]
        grainsfunc.assert_not_called()