def METHOD_NAME(self, find_replace):
    with pytest.raises(TaskOptionsError):
        task_config = TaskConfig(
            {
                "options": {
                    "find": "foo",
                    "replace": "bar",
                    "env_replace": True,
                    "path": ".",
                    "max": 1,
                }
            }
        )
        task = util.FindReplace(self.project_config, task_config, self.org_config)
        task()
        find_replace.assert_called_once()