code: def test_deploy_job(self, mock_stdout):
      job_name = deploy.deploy_job(
          self.docker_img,
          self.chief_config,
          self.worker_count,
          self.worker_config,
          self.entry_point_args,
          self.stream_logs,
          service_account=self.service_account,
      )
  
      self.assertEqual(job_name, self.mock_job_id)
  
      # Verify discovery API is invoked as expected.
      self.assertEqual(self._mock_discovery_build.call_count, 1)
      args, kwargs = self._mock_discovery_build.call_args
      self.assertListEqual(list(args), ["ml", "v1"])
      self.assertDictEqual(
          kwargs,
          {
              "cache_discovery": False,
              "requestBuilder": google_api_client.TFCloudHttpRequest,
          },
      )
  
      # Verify job is created as expected
      build_ret_val = self._mock_discovery_build.return_value
      self.assertEqual(build_ret_val.projects.call_count, 1)
  
      proj_ret_val = build_ret_val.projects.return_value
      self.assertEqual(proj_ret_val.jobs.call_count, 1)
  
      jobs_ret_val = proj_ret_val.jobs.return_value
      self.assertEqual(jobs_ret_val.create.call_count, 1)
  
      # Verify job creation args
      _, kwargs = jobs_ret_val.create.call_args
      self.assertDictEqual(
          kwargs,
          {
              "parent": "projects/" + self.mock_project_name,
              "body": self.expected_request_dict,
          },
      )
  
      # Verify print statement
      self.assertEqual(
          mock_stdout.getvalue(),
          "\nJob submitted successfully."
          "\nYour job ID is:  {}\n"
          "\nPlease access your training job information here:\nhttps://"
          "console.cloud.google.com/mlengine/jobs/{}?project={}\n"
          "\nPlease access your training job logs here: "
          "https://console.cloud.google.com/logs/viewer?resource=ml_job%2F"
          "job_id%2F{}&interval=NO_LIMIT&project={}\n\n".format(
              self.mock_job_id,
              self.mock_job_id,
              self.mock_project_name,
              self.mock_job_id,
              self.mock_project_name,
          ),
      )
  
file_path: cloud/src/python/tensorflow_cloud/core/tests/unit/deploy_test.py
imports: import io
  from absl.testing import absltest
  from googleapiclient import discovery
  from googleapiclient import errors
  import mock
  from tensorflow_cloud.core import deploy
  from tensorflow_cloud.core import gcp
  from tensorflow_cloud.core import machine_config
  from tensorflow_cloud.utils import google_api_client
label_desc: Use image node_id 3 for calling the TestDeploy obj's underlying member method code with example usage: obj.test_deploy_job(mock_stdout) without return types