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: Verify that assignment to nested secrets raises TypeError.
docstr_tok: ["Verify","that","assignment","to","nested","secrets","raises","TypeError","."]
code: def test_getattr_raises_exception_on_attr_dict(self, *mocks):
      """Verify that assignment to nested secrets raises TypeError."""
      with self.assertRaises(TypeError):
          self.secrets.subsection["new_secret"] = "123"
  
      with self.assertRaises(TypeError):
          self.secrets.subsection.new_secret = "123"
  
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 13 for calling the SecretsTest obj's underlying member method code with example usage: obj.test_getattr_raises_exception_on_attr_dict() without return types