def METHOD_NAME(git_project_mock, git_repo_mock):
    flexmock(Path).should_receive("write_text")
    return flexmock(
        git_project=git_project_mock,
        working_dir=Path("/mock_dir"),
        ref="mock_ref",
        git_repo=git_repo_mock,
        checkout_release=lambda *_: None,
        commit_hexsha="_",
        repo_name="package",
    )