class_docstr: Tests for st.secrets with a single secrets.toml file
class_docstr_tok: ["Tests","for","st.secrets","with","a","single","secrets.toml","file"]
docstr: os.environ gets patched when we load our secrets.toml
docstr_tok: ["os.environ","gets","patched","when","we","load","our","secrets.toml"]
code: def test_os_environ(self, _):
      """os.environ gets patched when we load our secrets.toml"""
      # We haven't loaded secrets yet
      self.assertEqual(os.environ.get("db_username"), None)
  
      self.secrets.load_if_toml_exists()
      self.assertEqual(os.environ["db_username"], "Jane")
      self.assertEqual(os.environ["db_password"], "12345qwerty")
  
      # Subsections do not get loaded into os.environ
      self.assertEqual(os.environ.get("subsection"), None)
  
imports: import os
  import tempfile
  import unittest
  from collections.abc import Mapping
  from collections.abc import MutableMapping
  from typing import Mapping, MutableMapping
  from unittest.mock import MagicMock, mock_open, patch
  from parameterized import parameterized
  from toml import TomlDecodeError
  from streamlit.runtime.secrets import SECRETS_FILE_LOCS, AttrDict, Secrets
  from tests.exception_capturing_thread import call_on_threads
label_desc: Use image node_id 7 for calling the SecretsTest obj's underlying member method code with example usage: obj.test_os_environ(_) without return types