As discussed in  https://github.com/apache/airflow/pull/15534#discussion_r620500075, we could possibly rewrite Beam Hook to remove the need of storing state in it.
mock_which.return_value = None
        hook = BeamHook(runner=DEFAULT_RUNNER)
        error_message = (
            r"You need to have Go installed to run beam go pipeline\. See .* "
            "installation guide. If you are running airflow in Docker see more info at '.*'"
        )
        with pytest.raises(AirflowException, match=error_message):
            hook.start_go_pipeline(
                go_file=GO_FILE,
                variables=copy.deepcopy(BEAM_VARIABLES_GO),
            )
    @mock.patch(BEAM_STRING.format("BeamCommandRunner"))
    def test_start_go_pipeline_with_binary(self, mock_runner):