docstr: Test that execution_role_arn only gets passed when it is not None.
docstr_tok: ["Test","that","execution_role_arn","only","gets","passed","when","it","is","not","None","."]
code: def test_add_job_flow_steps_execution_role_arn(self, mock_conn):
      """
      Test that execution_role_arn only gets passed when it is not None.
      """
      mock_conn.run_job_flow.return_value = {
          "JobFlowId": "job_flow_id",
          "ClusterArn": "cluster_arn",
      }
      mock_conn.add_job_flow_steps.return_value = {
          "StepIds": [
              "step_id",
          ],
          "ResponseMetadata": {"HTTPStatusCode": 200},
      }
      hook = EmrHook(
          aws_conn_id="aws_default", emr_conn_id="emr_default"
      )
  
      job_flow = hook.create_job_flow(
          {
              "Name": "test_cluster",
              "Instances": {"KeepJobFlowAliveWhenNoSteps": True},
          }
      )
  
      job_flow_id = job_flow["JobFlowId"]
  
      step = {
          "ActionOnFailure": "test_step",
          "HadoopJarStep": {
              "Args": ["test args"],
              "Jar": "test.jar",
          },
          "Name": "step_1",
      }
  
      hook.add_job_flow_steps(job_flow_id=job_flow_id, steps=step)
      mock_conn.add_job_flow_steps.assert_called_with(
          JobFlowId=job_flow_id, Steps=step
      )
  
      hook.add_job_flow_steps(
          job_flow_id=job_flow_id, steps=step, execution_role_arn=None
      )
      mock_conn.add_job_flow_steps.assert_called_with(
          JobFlowId=job_flow_id, Steps=step
      )
  
      hook.add_job_flow_steps(
          job_flow_id=job_flow_id, steps=step, execution_role_arn=""
      )
      mock_conn.add_job_flow_steps.assert_called_with(
          JobFlowId=job_flow_id, Steps=step
      )
  
      hook.add_job_flow_steps(
          job_flow_id=job_flow_id,
          steps=step,
          execution_role_arn="test-execution-role-arn",
      )
      mock_conn.add_job_flow_steps.assert_called_with(
          JobFlowId=job_flow_id,
          Steps=step,
          ExecutionRoleArn="test-execution-role-arn",
      )
  
imports: from __future__ import annotations
  import re
  from unittest import mock
  import boto3
  import pytest
  from botocore.exceptions import WaiterError
  from moto import mock_emr
  from airflow.exceptions import AirflowException
  from airflow.providers.amazon.aws.hooks.emr import EmrHook
label_desc: Use image node_id 15 for calling the TestEmrHook obj's underlying member method code with example usage: obj.test_add_job_flow_steps_execution_role_arn(mock_conn) without return types