code: def test_config_file_present(
      self,
      mock_os,
      mock_path_exists,
      mock_psws,
      mock_management_util,
      mock_tabpy_state,
  ):
      self.assertTrue(self.config_file is not None)
      config_file = self.config_file
      config_file.write(
          "[TabPy]\n"
          "TABPY_QUERY_OBJECT_PATH = foo\n"
          "TABPY_STATE_PATH = bar\n".encode()
      )
      config_file.close()
  
      mock_os.path.realpath.return_value = "bar"
      mock_os.environ = {"TABPY_PORT": "1234"}
  
      app = TabPyApp(config_file.name)
  
      self.assertEqual(app.settings["port"], "1234")
      self.assertEqual(
          app.settings["server_version"],
          open("tabpy/VERSION").read().strip(),
      )
      self.assertEqual(app.settings["upload_dir"], "foo")
      self.assertEqual(app.settings["state_file_path"], "bar")
      self.assertEqual(app.settings["transfer_protocol"], "http")
      self.assertTrue("certificate_file" not in app.settings)
      self.assertTrue("key_file" not in app.settings)
      self.assertEqual(app.settings["log_request_context"], False)
      self.assertEqual(app.settings["evaluate_timeout"], 30)
  
imports: import os
  import unittest
  from tempfile import NamedTemporaryFile
  import tabpy
  from tabpy.tabpy_server.app.util import validate_cert
  from tabpy.tabpy_server.app.app import TabPyApp
  from unittest.mock import patch
label_desc: Use image node_id 3 for calling the TestPartialConfigFile obj's underlying member method code with example usage: obj.test_config_file_present(mock_os, mock_path_exists, mock_psws, mock_management_util, mock_tabpy_state) without return types