def METHOD_NAME(capfd):
    mock_args = MagicMock(
        service="", deploy_group="", soa_dir="", sha_only=True, json=False
    )
    with patch(
        "paasta_tools.cli.cmds.get_latest_deployment.get_currently_deployed_version",
        return_value=DeploymentVersion(sha="FAKE_SHA", image_version="extrastuff"),
        autospec=True,
    ), patch(
        "paasta_tools.cli.cmds.get_latest_deployment.validate_service_name",
        autospec=True,
    ):
        assert get_latest_deployment.paasta_get_latest_deployment(mock_args) == 0
        stdout = capfd.readouterr()[0]
        assert "FAKE_SHA" in stdout
        assert "extrastuff" not in stdout