code: def test_env_variables_in_config(
      self, mock_state, mock_get_state, mock_path_exists, mock_os
  ):
      mock_os.environ = {"foo": "baz"}
      config_file = self.config_file
      config_file.write("[TabPy]\n" "TABPY_PORT = %(foo)sbar".encode())
      config_file.close()
  
      app = TabPyApp(self.config_file.name)
      self.assertEqual(app.settings["port"], "bazbar")
  
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 6 for calling the TestPartialConfigFile obj's underlying member method code with example usage: obj.test_env_variables_in_config(mock_state, mock_get_state, mock_path_exists, mock_os) without return types