def METHOD_NAME():
    """
    Test to create a beacon based on a file
    """
    name = "/tmp/tempfile"
    with patch.dict(filestate.__salt__, {"beacons.list": MagicMock(return_value={})}):
        with patch.dict(filestate.__states__, {"beacon.present": beaconstate.present}):
            ret = filestate.mod_beacon(name, sfun="managed")
            expected = {
                "name": name,
                "changes": {},
                "result": True,
                "comment": "Not adding beacon.",
            }
            assert ret == expected
            ret = filestate.mod_beacon(name, sfun="managed", beacon=False)
            expected = {
                "name": name,
                "changes": {},
                "result": True,
                "comment": "Not adding beacon.",
            }
            assert ret == expected