def METHOD_NAME(input, expected):
    filename = "/path/to/fnord"
    with patch("os.path.exists", Mock(return_value=True)):
        # Consistent initial file stats
        stat_out = {
            "user": "luser",
            "group": "lgroup",
            "uid": 2001,
            "gid": 1001,
            "mode": "0123",
        }
        patch_stats = patch(
            "salt.modules.file.stats",
            Mock(return_value=stat_out),
        )
        # "chown" the file to the permissions we want in test["input"]
        # pylint: disable=W0640
        def fake_chown(cmd, *args, **kwargs):
            for k, v in input.items():
                stat_out.update({k: v})
        patch_chown = patch(
            "salt.modules.file.chown",
            Mock(side_effect=fake_chown),
        )
        with patch_stats, patch_chown:
            ret, pre_post = filemod.check_perms(
                name=filename,
                ret={},
                user=input["user"],
                group=input["group"],
                mode="123",
                follow_symlinks=False,
            )
            assert ret["changes"] == expected